Skip Navigation

[Resolved] Failed to create the layout

This thread is resolved. Here is a description of the problem and solution.

Problem:
I can not create Layouts.
Whenever I click on the Button "New Layout"; I receive:

Failed to create the layout

Solution:
There must be some misconfiguration or aggressive setting in the mod_security of your server.

Please contact your Server Admin to allow AJAX calls to the Server.

This support ticket is created 8 years 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by Jens 7 years, 12 months ago.

Assisted by: Beda.

Author
Posts
#393226
failed-layout.png

Hello,

I am trying to create a new layout and I get the message "Failed to create the layout".

WordPress, Types, Views and Layouts installed and all at latest versions. Have tried deactivating all plugins with exception of above 3 toolset plugins and the problem persists.

I do get a server error from my host (slightly modified):

[error] [client 123.123.123.123] ModSecurity: [file "/usr/local/xyz/rules/29_Apps_WPPlugin.conf"] [line "128"] [id "220620"] [rev "1"] [msg "COMODO WAF: found CVE-2012-6624"] Access denied with code 503 (phase 2). Match of "rx ^\\\\d+(px)?$" against "ARGS:width" required. [hostname "www.xyz.com"] [uri "/wp-admin/admin-ajax.php"] [unique_id "1234567890"]

Any thoughts?

Regards

#393289

Well, it is certainly a permission not granted by the server.

But to be honest I do not know why layouts is triggering this on your end, as that error is usually, well, not happening with Layouts.

I strongly Suspect ANY plugin that uses AJAX would fail on your website-server.

There must be some misconfiguration or aggressive setting in the mod_security of your server.

Please could you contact your Server Admin in regard?

This is a never yet happened issue of Layouts (I mean, that is not due to layouts)

I never seen it an the DEV also confirmed my above words.

Thank you

#393310
ajax-error.png

Have written to the host and will respond when I get an answer. It is possibly related to an issue I noticed when loading an existing layout, I get the following (image attached);

There was an error during the ajax request, make sure the data you send are in json format.

The error I get from the server is;

[Thu Apr 28 23:53:28 2016] [error] [client 123.123.123.123] [host hidden link; Error receiving response header (lsphp is killed?): ReceiveResponseHeader: receive pkg hdr failed: ReceiveLSHeader: nothing to read from backend socket, referer: hidden link

If this brings any ideas let me know. I'll pass on to host.

Thanks in advance.

#394502

Yes, it seems your Server is not allowing any AJAX operation in your Website.

This will also most probably make it impossible to use any other Plugin that uses AJAX as Layouts does.

Please ask the Host to allow AJAX requests on your server.

Thanks

#394627

The ModSecurity issue was resolved by changing a rule relating to the CVE-2012-6624 XSS vulnerability. Layouts can now be created again.

My host suggests the ReceiveResponseHeader issue is due to an out-of-memory situation when loading a particular Layout for editing. I have increased wp-config and php.ini to 256M+ however the error still remains.

That layout is a homepage child that loads a (simple) parametric search and two views that display random posts from a tag; which I don't think should be resource intensive. I am currently running some plugin performance tests that shows Views, followed by Types, are using the most resources, so am looking at ways to optimise that layout and the views therein.

Thanks for the help.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.