Server-Side Issue with Google Maps iframe Code
I have a WordPress webpage that won't embed the standard Google Map iframe code. Everytime I go to save the page in the WordPress theme builder, it give me this error:
An error has occurred while saving your page. Various problems can cause a save to fail, such as a lack of server resources, firewall blockages, plugin conflicts or server misconfiguration. You can try saving again by clicking Try Again, or you can download a backup of your unsaved page by clicking Download Backup. Backups can be restored using the portability system while next editing your page.
Contacting your host and asking them to increase the following PHP variables may help: memory_limit, max_execution_time, upload_max_filesize, post_max_size, max_input_time, max_input_vars. In addition, auditing your firewall error log (such as ModSecurity) may reveal false positives that are preventing saves from completing.
Lastly, it is recommended that you temporarily disable all WordPress plugins and browser extensions and try to save again to determine if something is causing a conflict.
The theme developer said something is blocking this page from saving and told us to get our hosting company to whitelist any rule that gets triggered by our WP Theme Builder and it should work correctly after that. They said it's most likely a "mod_security" issue. I did look in our WHM and it looks like we don't even have mod_security installed.
Our hosting company says it's a web development issue. Here's what our hosting company said:
According to my browser diagnostics, and the raw access log for your domain, the requests to the server that trigger that popup are being responded with a '403' error... but here's the important bit: the 403 error is not coming from apache. No log report is written to the apache error_log at all for this event.
This indicates that the 403 error is coming from PHP code directly (PHP can set the response code as part of the reponse...) The code is itself not encountering a PHP error, but it's actually doing this because it's programmed to. Since this is the case, php isn't writing an error_log either.
It's also worth noting - I have a few other WordPress websites installed on the exact same cPanel (just in different subfolders) and none of them have this issue. I use the exact same WP theme for all of these sites and the exact same theme modules to add the Google maps code. This is the only website/subfolder in this cPanel where the map won't work/is being blocked.
According to Chrome Dev Tools, there is an issue with the /wp-admin/admin-ajax.php file:
Failed to load resource: the server responded with a status of 403 (Forbidden)
If anyone here has some ideas in resolving this, I would really appreciate it. Thank you!
-
Hey there! I'm sorry to hear about this odd WordPress issue. 403 would indicate *something* is restricting access, but you'd need to track down what exactly that is. For the permissions on the site, are all the folders 755 and all the files 644? I do agree this doesn't sound like a cPanel issue, but I'm not sure what else would provide a 403 besides Apache. 0 -
Thank your reply. I checked the permission. It looks like all the folders are 755 and files are 644. I should mention, I switched the theme of this site to a standard WordPress theme (Twenty TwentyOne), added the Google iFrame code and the same page saved fine. But then I switched the Theme back and the error would come up again. But the theme developer insists there is something on the server blocking us from being able to save this Google Map code. It's truly perplexing. 0 -
If the site works on the default WordPress theme but not on a custom theme, that would be enough to isolate the issue to a theme problem for me. 0 -
I agree, but they are adamant we need to unblock something on our server to make their theme work. We shouldn't have to do that...... Thanks for your reply. I will get back to the Theme developers. 0 -
That sounds good. If you don't make much progress you're always welcome to open a ticket so we can check the system in real-time while replicating the issue. 0 -
It turns out, we had a security plugin installed at MyDomain.com which was causing issues with this code at MyDomain.com/subfolder. I thought about that as a possible issue, but we weren't receiving any notifications from the security plugin about this. Live and learn! 0 -
I'm glad you were able to track that down! 0
Please sign in to leave a comment.
Comments
7 comments