Error 406 when I attempt to save customizations to Elemental theme

Does anyone know why I might get a 406 error when I try saving after selecting an alternate color scheme while customizing the Elemental theme?

I enter into Page Settings / Design / Customize and choose a new Preset and click Save Styles, choose Entire Site, and click Confirm. An Error window pops up with this info:

Error 406 - Not Acceptable

Generally a 406 error is caused because a request has been blocked by Mod Security. If you believe that your request has been blocked by mistake please contact the web site owner.

To my knowledge, I have full Administrator rights.

Does anyone know what might be wrong and how to fix this? I haven’t seen this issue posted before.

Mod Security is a server side setting that you can manipulate via your server cPanel, I usually switch it off.

Previous forum discussion: Anyone Else Have ModSecurity Issue?

There were recurring issues with saving where the theme provided large numbers of customisations. The way v9 provides customisation variables is more verbose than v8, so runs into POST data limits sooner. AFAIK, these issues were resolved in 9.1.3

My core version is 9.2.0 - if it was resolved in 9.1.3, it’s back. Maybe something else is at fault?

Maybe it is only fully fixed for new themes that use the v9 customisation system. So perhaps themes such as Elemental, which use the old v8 customisation system, fall foul of a similar bug that was not fixed.

You could post a new issue and link to the previous issue.

Strange - I chose to use the Elemental theme on this, my own low-priority site, assuming it would be the least likely to display v.9 compatibility problems since it is packaged with the core by default. Other suggestions have said I should turn off ModSecurity. While that is possible, it is not recommended as a long-term solution because it increases vulnerability. I guess I’ll try a different theme.

Somewhere in your php configuration and/or in the apache mod_security configuration there will be config settings for the maximum post size (bytes) and the maximum number of post parameters. As each update of v9 implements more functionality in the side panels (and hence more complex forms), this eats up post variables.

Personally, for a theme customisation, I use CSS rather than the page design panel. For an Elemental site, try Elemental Cloner to get a base theme you can then modify by editing the LESS.

Or you can use Theme Styling Tool to edit/add smaller snippets of css.

1 Like

Thanks for your help!

(. . . and, sorry for the late reply - I got swamped with higher-priority issues.)