Home › Forums › BulletProof Security Free › NextScripts: Social Networks Auto-Poster – 500 error
Tagged: 500 error, NextScripts, Social Networks Auto-Poster
- This topic has 9 replies, 2 voices, and was last updated 8 years, 3 months ago by
AITpro Admin.
-
AuthorPosts
-
ristudio
Participant[Topic Title was changed – Problem was caused by the NextScripts: Social Networks Auto-Poster plugin]
After upgrading to the latest WP version as well as the latest BPS version, I started to get 500 errors both on admin side and user side for all ajax and jquery commands. This includes a 500 error when trying to load the Media Library, since it uses admin-ajax. Also, includes setting a featured image on a post (no images load nor can you upload an image). On the user side, the contact form becomes broken since it relies on ajax.
I have troubleshooted the issue by disabling both root and admin protection. Enabling admin protection doesn’t affect anything. Once I enable the root protection, the problems occur. Using default.htaccess isn’t making any problems.
Examples of errors:
GET hxxp://www.domain.com/connect/contact/?_wpcf7_is_ajax_call=1&_wpcf7=1581&_wpcf7_request_ver=1424979016422 500 (Internal Server Error) Failed to load resource: the server responded with a status of 500 (Internal Server Error) hxxp://www.domain.com/wp-admin/upload.php Failed to load resource: the server responded with a status of 500 (Internal Server Error) hxxp://www.domain.com/wp-admin/admin-ajax.php POST hxxp://www.domain.com/wp-admin/admin-ajax.php 500 (Internal Server Error) load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload,json2&ver=4.1.1:4
AITpro Admin
KeymasterBy default BPS will block admin-ajax.php if it is called in certain ways on the frontend of a site, but admin-ajax.php is not blocked in the default WordPress Media Library or any other backend areas of WordPress.
Important Notes:
• There used be a known issue/problem with Contact Form 7 and W3TC, but that was a couple of years back so not sure if that is still a problem.
• On some host servers you can use only the root .htaccess file and not the wp-admin .htaccess file. On other host servers you MUST use both the root and wp-admin .htaccess files together or things will not work correctly.Try adding an admin-ajax.php skip/bypass rule in BPS wp-admin Custom Code.
1. Add the admin-ajax.php skip/bypass rule below to this wp-admin Custom Code text box: CUSTOM CODE WPADMIN PLUGIN/FILE SKIP RULES
2. Click the Save wp-admin Custom Code button.
3. Go to the Security Modes page and Activate wp-admin Folder BulletProof Mode.Note: The skip rule must be [S=2] because it will be written to your wp-admin .htaccess file above skip / bypass rule [S=1]. If you have other wp-admin skip/bypass rules already then either combine them or add this skip/bypass rule separately above the other rules and change the skip #. Example: If you already have skip #’s 2 and 3 then this rule would be skip rule #4.
# admin-ajax.php skip/bypass rule RewriteCond %{REQUEST_URI} (admin-ajax\.php) [NC] RewriteRule . - [S=2]
ristudio
ParticipantI already have the following in the admin htaccess
# admin-ajax.php and post.php skip/bypass rule RewriteCond %{REQUEST_URI} (admin-ajax\.php|post\.php|admin\.php) [NC] RewriteRule . - [S=2]
I should also mention that I’ve had the same setup (including server) for several years now. The only changes that were made to the htaccess files are the ones made by BPS. Any suggestions?
AITpro Admin
KeymasterMaybe WordPress or Contact Form 7 needs to be reinstalled? I see that you have isolated the problem to the root .htaccess file, but there is no documentation anywhere that the root .htaccess file has ever caused these types of problems or these problems with Contact Form 7. The only other logical thing I can think of is something like this: ModSecurity or something similar is installed on your Host Server and when the BPS root .htaccess file/code is present then whatever is installed on your Host Server is causing some sort of chain reaction problem. ie the 500 error is actually the result of trying to process the BPS root .htaccess code/file by something installed on the Host Server.
ristudio
ParticipantJust to clarify, the issue isn’t just with Contact Form 7, it’s with anything that uses ajax both front end and back end. Also, I’m not getting a 500 error while loading a page, the page(s) load fine but anything that’s using ajax is returning a 500 error in the inspector console (Chrome). Would it be possible to privately submit the htaccess file so that you can glance at it for possible inaccuracies?
AITpro Admin
KeymasterSure you can send the htaccess file to info at ait-pro dot com, but I cannot think of any standard BPS root .htaccess code that has the capability to cause these problems/errors. If you have added any additional custom .htaccess code to the root .htaccess file then that code might be causing these problems I guess. Since the problems you are describing have never been reported before in the last 5+ years then what is more likely is some kind of conflict between BPS .htaccess code and something either installed on your website or on your server. It is possible that a chain reaction problem could be caused by some other plugin you have installed and the BPS plugin’s htaccess code.
ristudio
ParticipantYou were absolutely right, it was another plugin which was hooking on to the WordPress ajax. After further Googling, found Alfred D Souza’s solution: https://wordpress.org/support/topic/networkerror-500-internal-server-error-wordpress-41-multisite#post-6376526 which was right on point. The culprit is: ‘NextScripts: Social Networks Auto-Poster’ plugin
Thank you for your assistance.
AITpro Admin
KeymasterGreat! Glad you got it figured out.
ristudio
ParticipantI agree, Next Scripts do cause lots of problems here and there. I’d leave this post, I’m sure I’m not the only one who was completely clueless as to what was happening and the cause.
AITpro Admin
KeymasterYep. This forum topic will remain. The topic title has been changed. I checked the Next Scripts plugin support forum and either they are not aware that their plugin is causing 500 errors or they do not feel like the root cause of the problem is their plugin. I see that they are saying it is a server memory allocation problem, but you have clearly shown (the error messages that you posted) that it is a direct problem with the NextScripts: Social Networks Auto-Poster plugin blocking admin-ajax.php calls and has nothing to do with memory.
-
AuthorPosts
- You must be logged in to reply to this topic.