Skip Navigation

[Resolved] Problem with Layout

This support ticket is created 5 years, 3 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 14 replies, has 2 voices.

Last updated by Christian Cox 5 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1308639
Capture d’écran 2019-08-03 à 16.43.44.png

Hi,
I have a problem on few pages on my site.
YOu can see picture.

#1308905

Hello, can you try these troubleshooting steps?
- Temporarily activate the parent Astra theme and deactivate any custom code snippets in Toolset > Settings > Custom Code. Then temporarily deactivate all plugins except Types, Views and Layouts.
- Clear your browser cache, then test the Layouts editor again.
- If the problem is resolved, reactivate your child theme, custom code snippets, and other plugins one by one until the problem returns. Let me know what you find out.
- If the problem is not resolved, please open the browser console and reload the Layouts editor page. Let me know if any JavaScript errors are displayed.

#1310729

Hi, strange i thought i have replied and no 🙁

So i have tried to turn off theme and extensions and the problem was still there.

This is the error i have

VM1058:1 Uncaught SyntaxError: Unexpected token c in JSON at position 153
at JSON.parse (<anonymous>)
at Function.n.parseJSON (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags,wp-a11y,wplink,suggest,shortcode,wp-util,jquery-ui-slider,jquery-touch-pun&load[]=ch,iris,wp-color-picker&ver=5.2.2:4)
at Function.a.parseJSON (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags,wp-a11y,wplink,suggest,shortcode,wp-util,jquery-ui-slider,jquery-touch-pun&load[]=ch,iris,wp-color-picker&ver=5.2.2:8)
at DDLayout.AdminPage.self.init (main.js:4)
at new DDLayout.AdminPage (main.js:52)
at main.js:2
at r (head.min.js?ver=3.4.4:10)
at Array.<anonymous> (head.min.js?ver=3.4.4:16)
at m (head.min.js?ver=3.4.4:10)
at head.min.js?ver=3.4.4:16
n.parseJSON @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags,wp-a11y,wplink,suggest,shortcode,wp-util,jquery-ui-slider,jquery-touch-pun&load[]=ch,iris,wp-color-picker&ver=5.2.2:4
a.parseJSON @ load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-dragga&load[]=ble,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,backbone,jquery-effects-core,jquery-effects-size,jquery-&load[]=effects-scale,jquery-ui-sortable,wp-pointer,quicktags,wp-a11y,wplink,suggest,shortcode,wp-util,jquery-ui-slider,jquery-touch-pun&load[]=ch,iris,wp-color-picker&ver=5.2.2:8
self.init @ main.js:4
DDLayout.AdminPage @ main.js:52
(anonymous) @ main.js:2
r @ head.min.js?ver=3.4.4:10
(anonymous) @ head.min.js?ver=3.4.4:16
m @ head.min.js?ver=3.4.4:10
(anonymous) @ head.min.js?ver=3.4.4:16
r @ head.min.js?ver=3.4.4:10
(anonymous) @ head.min.js?ver=3.4.4:12
m @ head.min.js?ver=3.4.4:10
p @ head.min.js?ver=3.4.4:12
c @ head.min.js?ver=3.4.4:13

Thanks a lot

#1310735

Okay thank you. Can you export your site's Layouts for me? Go to Toolset > Export/Import > Layouts tab. Then post those exported Layouts to Dropbox or Drive and post a download link in your next reply. I'll try to import those Layouts on my own site and see if the problem occurs here for me.

#1310737

You can find there : hidden link

#1310739

Okay hmmm, I didn't get the la-loi-pinel Layout you showed in your first screenshot so something strange is going on. There may be some data corruption. Can I log in and create a site clone using the Duplicator plugin?

#1310749

Thank you, I was able to make a site clone and reproduce the issue locally on my copy. I was not able to finish my investigation today, but I will continue early tomorrow and give you some feedback as soon as possible.

#1311307

I don't see anything out of the ordinary that would be causing these issues, so I have asked my 2nd tier team to investigate. I will let you know what I find out.

#1311323

Hi,
Thanks for your answer.
You have the same problem when you duplicate ?

#1311437

Yes, I had the same problem in my copy of the site. I tested in the Content Layout editor for Loi Pinel and saw the same problem.

#1312357

It seems that the database content for these Content Layouts has been corrupted. Can you tell me more about this site?
- Did you edit the database content manually for these Content Layouts?
- Was the Content Layout content imported or migrated from another site?
- Did you click "Stop editing with Layouts" and make changes, then try to edit with Layouts again?
- Is there anything else you can tell me about the history of this site or these posts?

My 2nd tier team said you can run a script to reinitialize these Content Layouts, but the previous contents will be lost:

add_action('init', 'reinitialize_corrupted_layout', 10, 2);
function reinitialize_corrupted_layout()
{
    $posts = array(155, 120); // a list of post IDs with the problem in the Content Layout editor
    foreach ($posts as $post_id) {
        update_post_meta($post_id, '_private_layouts_template_in_use', 'yes');
        update_post_meta($post_id, '_dd_layouts_settings', '{"type":"fluid","name":"Layout for page","cssframework":"bootstrap-3","template":"","parent":null,"Rows":[{"Cells":[{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:1","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s426"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:2","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s428"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:3","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s430"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:4","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s432"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:5","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s434"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:6","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s436"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:7","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s438"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:8","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s440"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:9","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s442"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:10","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s444"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:11","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s446"},{"content":null,"kind":"Cell","cell_type":"spacer","column_prefix":"col-sm-","name":"spacer:12","cssClass":"span1","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"s448"}],"cssClass":"row-fluid","kind":"Row","row_type":"row","layout_type":"fluid","mode":"full-width","name":"Post content row","cssId":"","tag":"div","width":1,"row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","id":"11"}],"width":12,"cssClass":"span12","id":"155","kind":"Layout","has_child":false,"slug":"","has_loop":false,"has_post_content_cell":false,"column_prefix":"col-sm-","no_default_prefix":false,"cssId":"","tag":"div","row_divider":1,"additionalCssClasses":"","editorVisualTemplateID":"","layout_type":"private","owner_kind":"page","field_kind":null}');
    }
}

You would have to update the $posts array to include a comma-separated list of all posts where the problem can be seen in the Content Layout editor. Then run this code once to reinitialize those Content Layouts.

#1312607

Hi,
Thanks for your answer.
Yes layout, pages and all elements were import from previous website.

For you help, i am not sure to understand, i have tried, and yes that deleted the post, but what is the interest to do that ?
First i will lose all my posts, it is bit embarrassing and second, if i want to do that, i can delete pages and make new ones, no ?

#1312611

Okay, did you keep the export files from the original site, or did you keep a backup of the original site's database?

#1312617

No sorry, it is bit complicated because the website has some problems so i create a new one and trash some elements...

But i think i will use the HTML source code and create paged from scratch.

The next time when import layout, i will check all pages 🙂

#1312619

Okay sorry we do not have an easy fix for the data corruption.