cancel
Showing results for 
Search instead for 
Did you mean: 

Admin Design Configuration 404 on save

Admin Design Configuration 404 on save

I am using (Magento CE 2.2.1) trying to edit the html head scripts and Stylesheets and change the Favicon logo, but it seems that clicking on 'Save and Continue' or 'Save Configuration' causes the admin panel to 404. The steps below show how I get this error:
 
  1.  Through the magento Dashboard: Content --> (Design) Configuration --> (HTML Head) Scripts and Stylesheets. 
  2. Click 'Save and Continue' or 'Save Configuration' (Scope Store View)
  3. Get 404
           
 
Apparently this is a known issue when upgrading Magento Versions? Our company upgraded from Magento 1 -> Magento 2 a few months ago. We've never had this problem before as we were able to make all kinds of design configuration edits through the admin panel before.
 
                          https://github.com/magento/magento2/issues/5703
 
 Below is the code currently in the 'Scripts and Style Sheets' Box:
 
HTML Head
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KPDDWM4');</script>
<!-- End Google Tag Manager -->
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KPDDWM4" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Footer (Miscellaneous HTML):
<!-- Chat Script --><script>
!function() {
  var t;
  if (t = window.driftt = window.drift = window.driftt || [], !t.init) return t.invoked ? void (window.console && console.error && console.error("Drift snippet included twice.")) : (t.invoked = !0, 
  t.methods = [ "identify", "config", "track", "reset", "debug", "show", "ping", "page", "hide", "off", "on" ], 
  t.factory = function(e) {
    return function() {
      var n;
      return n = Array.prototype.slice.call(arguments), n.unshift(e), t.push(n), t;
    };
  }, t.methods.forEach(function(e) {
    t[e] = t.factory(e);
  }), t.load = function(t) {
    var e, n, o, i;
    e = 3e5, i = Math.ceil(new Date() / e) * e, o = document.createElement("script"), 
    o.type = "text/javascript", o.async = !0, o.crossorigin = "anonymous", o.src="https://js.driftt.com/include/" + i + "/" + t + ".js", 
    n = document.getElementsByTagName("script")[0], n.parentNode.insertBefore(o, n);
  });
}();
drift.SNIPPET_VERSION = '0.3.1';
drift.load('pe9cehn2ueg8');
</script>
<!-- Chat Script -->
Things ive tried that didnt work:
  • Copy the folder \vendor\magento\module-email\view\frontend\email to \vendor\magento\module-email\view\adminhtml\email\ 
  • You will see that if the $storeId is 0, then false will be returned, which is the case here for global configuration. If I change the condition to ($storeId !== false), I can successfully save the configuration 
  • Re-index all index's, clear cache, sign-out
 
Here is some helpful forums with solutions ive tried.
 
Any Information would be greatly appreciated!
1 REPLY 1

Re: Admin Design Configuration 404 on save

Did you ever find a solution to this problem? I'm getting it now on M2.3.5pl2.

 

Thanks,

Fran.

 

EDIT: Solution is here: https://community.magento.com/t5/Magento-2-x-Admin-Configuration/Admin-Changing-Theme-Content-Design...

 

Details:

I was able to find the solution and it was mod_security. I edited my modsecurity.conf file

 

From: SecRuleEngine On

To: SecRuleEngine Off

 

You can also disable mod_security on your server and it works. On a CentOS server running CWP7pro Admin, it's in "Security / Mod Security".