Your feedback is welcome

Permalink Browser Info Environment
If you see anything in a Cobble query that you don't understand or think may be in error, please start a discussion here so others can benefit from it. If you could attach a CSV file with the query results, that would be excellent! This is a work in progress that will likely change a lot as Concrete5 evolves.

Any suggestions for additional queries, better documentation of the API, improvements to the UI, etc... are also welcome.

Type: Discussion
Status: New
agedman
View Replies:
CBknits replied on at Permalink Reply
CBknits
I downloaded and installed Cobble successfully. When I clicked on "Cobble" button in my dashboard for the first time, I got an Unexpected Error message:

mysql error: [1253: COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'latin1'] in EXECUTE("update CobblePageTypes set isSinglePageHandle = 1 where ctHandle collate utf8_general_ci in (select cHandle collate utf8_general_ci from Collections inner join Pages on Collections.cID = Pages.cID where Pages.ctID = 0)")

Should I go into MySql tables and change the character sets manually myself? Please help.
Thank you
agedman replied on at Permalink Reply
agedman
Sorry, it looks like I still haven't got the collation issue worked out correctly yet. I'll try to get it right in the next version. I wouldn't recommend changing your character sets at this point.

Mnkras was having trouble with several queries because (I believe) his Concrete5 tables are using a different collation than his database default collation. When he installed Cobble, the cobble tables got created using the database default. This was causing string comparisons between values in the Cobble tables and the C5 tables to fail.

I had hoped that coercing both sides of such comparisons to the utf8_general_ci collation would fix this, but apparently that collation isn't compatible with the latin1 character set. I'll try to get this fixed asap.
agedman replied on at Permalink Reply
agedman
This error should be fixed in version 1.10. I added 'convert(fieldname using utf8)' before forcing the collation to utf8_general_ci. Please let me know if you're still seeing errors...
CBknits replied on at Permalink Reply
CBknits
Wow! That was quick. Yes it is working great now. Thank you.
CBknits replied on at Permalink Reply 2 Attachments
CBknits
I was customizing my new theme from the Plain Yogurt theme (after copying it to the /themes folder). I successfully added a 3 cell layout to my main area on home page. Then I tried to add some padding (with css) to the cells but was unsuccessful because I couldn't figure out the cell names and wasn't sure if I broke something. So I thought this Addon would help me figure it out. It's very cool and informative.

Attached are 2 csv files of some results. I have several "area handles" that are duplicated on the home page template. I think that is OK, right?

I also have some block referencing areas that are no longer in the template (because of my editing). Is this a problem, should I fix it?

Thanks for such a cool diagnostic tool!
agedman replied on at Permalink Reply
agedman
There definitely seems to be somthing funny with main.php. Maybe the header and footer are getting $this->inc()'d more than once?? Since this addon is so new and may still have some bugs, I'd like to proceed slowly if that's ok. Could you zip up the main.php and attach it?

EDIT: Sorry, I meant full.php
CBknits replied on at Permalink Reply 1 Attachment
CBknits
Attached is the full.php.zip file.
agedman replied on at Permalink Reply
agedman
Thanks! Nothing wrong with your template. It seems that there must be some bugs in the code that populates the CobbleAreas table. This is the first time I've seen this issue. Maybe it has something to do with adding a layout and removing it. I'll try to reproduce the error on my end.

As far as your issue with padding the layouts, maybe the padding could be aded to the layout cells using the 'design' feature. I think if you click on "Add to Main : Layout : Cell1" and select design, you can set the padding for the layout cell. I think you need to do it for all three cells. If that doesn't work for you, you might want to post to the 'Design' forum. I haven't got too much experience with layouts...

EDIT: If it's not too much trouble, maybe you could attach the CSV's for the 'Pages' and 'Page Types' informational queries too. I haven't been able to reproduce the 'duplicate areas' issue so far. As far as your question about "blocks referencing areas not in template", I don't think I'd worry about it unless you renamed an area in a template and some blocks disappeared from the page.

EDIT: One other thing that seemed odd in the area_view.csv you posted was that it seems to be showing two separate page defaults templates for the "Press Release" page type, both of which contain blocks. Also, it's interesting that the "Header" area handle does not show as duplicated on the home page while all the other areas do.
CBknits replied on at Permalink Reply 2 Attachments
CBknits
I fiddled with the 3-cell Layouts a lot...moving them to top, botton, in header, switching their order, deleting, adding, rearranging them. Towards the end of my exploration I recall something looking strange, I wondered if I broke it.

Meanwhile attached are the page and page-type csv files you requested.

I'd be glad to screen share with you if you want to take a look, I'm kind of worried about the strange things it found. You can PM me.

EDIT: I just tried adding some padding using the design tips you gave--IT WORKS! Thank you I can't tell you how many times I looked for that, don't know how I missed it!!!

Thanks
olacom replied on at Permalink Reply
olacom
I have over 1000 pages in our website and it as freezed everything. The website was inacessible. I did had to kill the process directly from my whm console.
MrNiceGaius replied on at Permalink Reply
MrNiceGaius
Thank you for the great add-on, it is extremely useful. I have a question about the CSV file and how I can use it to create a MySQL query.

I have 89 orphaned blocks due to changing the area names in the templates and now I'm trying to delete all the orphans from the database. I'm not very experienced in writing MySQL queries but am a quick learner. I wanted to ask you what the best way to delete all of my orphan blocks from the database. Do I need to write a custom php script to loop over the csv file and delete each block or is there a way to do it in one full swoop?

Thanks again, and any help or pointers would be very much appreciated.
agedman replied on at Permalink Reply
agedman
Sorry for the late reply. I don't know if removing the orphaned blocks is a good idea or not. I purposely limited the scope of this tool to be an analytical tool. But having said that, it should be pretty simple to perform a mass delete. Be sure to back up your database first -- there's no warranty!!!

You could take the values in the bID column of the CSV file and put them into a comma separated list, then in PhpMyAdmin execute a query that uses that list something like this:

DELETE FROM Blocks WHERE bID IN (3,4,12,36,27 ...)


You could also clean up the references to those blocks in other tables:
DELETE FROM CollectionVersionBlocks  WHERE bID IN (3,4,12,36,27 ...)
DELETE FROM CollectionVersionBlockPermissions WHERE bID IN (3,4,12,36,27 ...)
DELETE FROM CollectionVersionBlockStyles WHERE bID IN (3,4,12,36,27 ...)


The queries are all in cobble/models/cobble.php. For example, the query to list all blocks that are orphaned (assigned to areas that don't exist in templates) is in the method: blocks_missing_areas_recent() located around line 309.
MrNiceGaius replied on at Permalink Reply
MrNiceGaius
Thanks Dow, these are very useful instructions. No worries on the late reply, those 89 orphan blocks are still sitting there :)

thanks again for taking the time to help.

cheers!

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.