[Resolved] Custom id’s broken after Layouts update
This thread is resolved. Here is a description of the problem and solution.
Problem: After updating Layouts I am finding invalid HTML markup around the "id" attribute for layouts rows. The custom IDs I have applied to each row are not being applied correctly, and I see markup like:
<div id="id="our-body"" class="row content " >
Solution: This bug will be addressed in a future release, but for now you can work around the issue by inserting a 1x1 grid of cells and applying your custom ID to the cell itself.
This support ticket is created 7 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
After updating a client site from Layouts 1.8.10 to the newest version, I am getting errors in html code. Source code no longer outputs proper div id's which have been set in Layouts. This appears to only affect layouts that use a Genesis row type (i.e. Genesis site header row, Genesis content row, Genesis sidebar row). All other id names in other row types appear to output properly. Below is an example of the html being generated by the plugin (this is a Genesis content row type):
<div id="id="our-body"" class="row content " >
This is extremely frustrating as it has broken all styling associated with these div id's. I do not want to use an old version of Layouts, but I can't update if this breaks my client's site.
I thought the issue might be related to the fact that the client hadn't updated the layout since 1.8.10, so I downloaded 1.9 and tried updating to that version. Had exactly the same problem. Restored site from backup, disabled all plugins and updated Layouts again. Same result ... broken id tags.
Hi, Shane is off today so I'm going to take over this ticket. I hope that's okay with you.
I've downloaded your child theme and run some tests. I installed Layouts 1.8.10 and created some Layouts using Genesis Content Rows. Then I updated to Layouts 1.9.3 and edited a Layout. I added a custom ID to one of the Genesis Content Rows and saved, then viewed a post where the Layout was applied. I can confirm the same results - the "id" attribute is malformed. I also ran the test using only Genesis without a custom child theme to rule out any child theme compatibility issues, and the problem remained. So it appears this is a compatibility issue with the Genesis theme and Layouts. I have escalated this concern to our 2nd tier support team for a bit more investigation. Hopefully they will be able to recommend a workaround so we can get your ID's functioning correctly again very soon. I will update you here as soon as I hear something from them.
Hi, as a workaround can you please try the following steps:
- Create a new row
- Add a Grid of Cells, 1x1, to this row at full-width (see attached screenshot)
- Apply your ID to this grid cell instead of the row
- Place your content in this new grid cell
- Remove your old row
Let me know if this works for you as a temporary fix while we work to resolve the row issue.
Thanks for confirming that the issue was Toolset and Genesis compatibility, not a problem with my child theme. I'm glad I was able to bring this to your attention, as Genesis is so popular among developers.
I was able to create my own workaround for this client site by just using classes instead of div ID's. I will try your grid cell workaround for ID's in a project I am working on now.
I assume that this bug was found too late in the development cycle of Layouts 2.0 to get in. Please let me know when an update with a patch comes out.