• I ran across a problem migrating a site from one host to another. I developed a script that would detect the current user and role and then redirect based on the current page and user. It invoked the wp_get_current_user() function. On the first host it worked flawlessly, but when I moved to the second host, it would fail when trying to save the script. When I hit the Save Changes button the page would either return a 403 Forbidden error or it would load the main page of the front end and return a page not found error. After doing some research, I found a related issue and reached out to my host to see if it applied to my situation and sure enough that was the issue. The issue ended up being a mod_sec setting on the second host. When I explained the problem, my host tweaked the mod_sec rules for my account and the plugin is working as expected once again. I am sharing this because I looked for almost a week trying to resolve the problem and could not find a direct solution anywhere. If you are seeing strange behavior with this plugin (or similar plugins that inject code) reach out to your hosting provider and see if they can adjust their mod_sec rules on Apache servers.

  • The topic ‘Error Page when saving’ is closed to new replies.