• Hello,

    Another week another plugin conflict! I have Members List installed as a new plugin on my site and whenever it is activated, it causes problems with the WPUF plugin which works perfectly when Members List is not activated.

    So, clearly there is a conflict but I am having issues debugging. The console indicates a admin-ajax.php 500 (internal server error) upon submitting the form for a new post and hangs on Please Wait. There is a file link with the above error in the console to jquery.js line 2.

    I also get the following error under the input field when trying to upload a featured image:-

    Error: -200, Message: HTTP Error., File: Filename.jpg

    If anyone can tell me what is the likely issue here I’d be very grateful as I don’t know where to start and the forums for both Plugins don’t seem to have this issue documented.

    I’m using the latest dev fork of WPUF (4.3 I think) and wordpress 3.5.1 on an apache server.

    http://wordpress.org/extend/plugins/wp-user-frontend/

Viewing 15 replies - 1 through 15 (of 19 total)
  • Unfortunately line2 in jquery.js.min is pretty much all of jquery. To find out exactly where you can install the non minimized version of JQuery which you can get from the JQuery website (check the WordPress version) and follow the stack trace in firebug. I generally rename the old version and use the same name for the un-minimised version (although there is an option somewhere you can set to use the unminified version).

    MembersList is not listed as WordPress 3.5.1 compatible so I would check their forum. Most times these types of problems are caused by plugin/themes not using wp_enqueue_scripts to load scripts and an example of this I just solved is here where TheStyle theme caused problems with Frontend.

    Thread Starter jonga1306

    (@jonga1306)

    I’ve just done a ‘view source’ on my front page and see the following list of jquery scripts below – is it normal to have this many sub-declarations? The site does have a lot of plugins but I’m not quite sure how the enqueue_scripts system works in wordpress and how I’d go about debugging jquery issues.

    Are you suggesting I update the main jquery.js script (the first in the list below)?

    I’ve seen the part in the thread you linked me to where you mention that 3.5.1 needs jquery 1.9.2 – however I’m not sure where to fix this from the Members List plugin – I found this….

    function tern_wp_members_js() {
    	if(!is_admin()) {
    		wp_enqueue_script('members-list',get_bloginfo('wpurl').'/wp-content/plugins/members-list/js/scripts.js',array('jquery'));
    	}
    }

    in a section of the plugin core files. Any thoughts on this? I know strictly speaking this is a query on a different plugin but whatever this plugin is doing wrong regarding its’ jquery declarations, it is stopping WPUF from working – this seems the only affected plugin.

    Here is the list of scripts in my source…

    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/jquery.js?ver=1.8.3'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.core.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.widget.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.position.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.mouse.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.sortable.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.datepicker.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.menu.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.resizable.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.draggable.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.button.min.js?ver=1.9.2'></script>
    <script type='text/javascript' src='https://www.culture.info/wp-includes/js/jquery/ui/jquery.ui.dialog.min.js?ver=1.9.2'></script>

    <script type=’text/javascript’ src=’https://www.culture.info/wp-content/themes/hotnews/javascripts/jquery.sharrre-1.3.3.min.js?ver=1.3.3′></script&gt;

    Hi Jonga.

    WordPress 3.5.1 requires jQuery 1.8.3 and jQuery UI 1.9.2.

    Strange that the members list author is loading those scripts from their own website rather than using WordPress’s version. As given (without seeing the rest of the script) this would cause problems with WordPress 3.4.2 and future WordPress versions. Also loading scripts twice as would happen with this code could cause problems.

    The wp_enqueue_script excerpt you give is the way it should happen.

    Try Firefox Firebug or Google Chrome – Developer Tools as shown on page 3 for user ‘loginid’ of my development thread to debug. The response to the admin-ajax.php ajax post on submit could be revealing

    As for the jquery script my earlier suggestion of replacing jquery temporarily by a non-minimized version may not shown anything due to member’s list loading their own version. However it depends on which version of jQuery is in use at the time

    Thread Starter jonga1306

    (@jonga1306)

    Have followed the steps as you suggest and had already been debugging via CONSOLE (hence the line 2 of jquery discovery!) – the NET result has come back and I have exported. I could send it to you if it is likely to be of use for any purpose but as I said, this is a conflict more than a WPUF issue so I guess it could be out of your remit!

    Hi Jonga,

    The logs would be quiet useful as often they contain errors that are unreported otherwise.

    You can email me them at abruinATihugDOTcomDOTau

    Actually I made a mistake in assuming the above jquery excerpts were hard code rather than html page source (late night).

    The jquery files as loaded are normal and don’t look like the source of the problem.

    However the 200 and 500 errors are abnormal.

    On further examination it has been confirmed that the current version of Member’s List 3.6.3 is incompatible with WordPress 3.5.1 and that is the cause of this error

    Thread Starter jonga1306

    (@jonga1306)

    Following your recommendation to try to the new development fork 4.4 – I’ve tried it but with no luck.

    I also scrapped Members List and tried an alternative: http://wordpress.org/support/plugin/amr-users/

    This is actually a better plugin and more customisable BUT…

    I’m getting pretty much the same problems now when this other plugin is active.

    – WPUF Upload Image returns -200 error.
    – WPUF Submit hangs on please wait and console shows the old admin-ajax.php error. Also – since 4.4 I get a popup message with 4 lines showing:-

    AjaxForm Error,
    Status:Error,
    Error: Internal Server Error,
    Response:

    Two other plugins (at least) are affected:-

    – Event Manager which has very similar issues on the upload form (frontend)

    – WYSIJA newsletters on the back end hangs on saving edits to newsletters.

    All these issues have 1 common denominator – admin-ajax.php with jquery line 2 are reported as the error in the console.

    So it seems that these members plugins must be doing something which breaks ajax functionality across other plugins. What that is exactly, I sadly have no idea!

    Thread Starter jonga1306

    (@jonga1306)

    I’ve installed new themes to test this with and am NOT having the same problems, which means that it must be a theme issue. I’m using HotNews by Envato / Theme Forest.

    Hi Jonga1306

    As you have noticed error reporting on submits in the latest development version is improved hence the different response from the last version.

    I think you have definitely found the root cause of the problem. We have had problems in the past with three way situations where another plugin has combined with a theme and Frontend to cause a problem.

    It’s always worth changing the theme temporarily back to a WordPress default theme when testing problems of this nature.

    The current version of the theme HotNews is listed as being WordPress 3.5.1 compatiable.

    The website of HotNews doesn’t list any problems of this nature but it’s worth a comment on their website just in case the author knows of the problem and already has a solution.

    Causes for the 500 error are multiple. It could be that the theme is rewritting the url but there are many other possibilities.

    A couple of things you could do to get more info on the error.

    1. Check your server error logs
    2. Enable WP_DEBUG (NB will show logs of warnings). A good plugin I use for this is Debug Bar and its sister Debug Bar Console

    A couple of questions however.

    1) What version of HotNews are you using
    2) Did you try MembersList with a default WordPress theme?
    3) Did the other plugins still have problems with Frontend deactivated and HotNews as theme?

    Thanks
    TheProfessor

    Thread Starter jonga1306

    (@jonga1306)

    Answers to questions:

    1) Hotnews v 1.0.0

    2) Members List active with the default WordPress theme does not cause any problems with the other plugins.

    3) Interestingly, with Frontend deactivated, the 3rd party plugins are OK even with Members List active.

    Server error log is empty but the debug is throwing up some interesting bits…

    Notice: Undefined index: page in /home/mysite/public_html/wp-content/plugins/members-list/core/search.php on line 30
    
    Notice: Undefined index: page in /home/mysite/public_html/wp-content/plugins/members-list/core/sort.php on line 30
    
    Notice: Undefined variable: cache_needs_updating in /home/mysite/public_html/wp-content/plugins/s2member/includes/classes/cache.inc.php on line 94

    Also

    WARNING: wp-includes/class-wp.php:402 - Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/wp-content/plugins/members-list/core/search.php:30)
    
    WARNING: wp-includes/functions.php:888 - Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/wp-content/plugins/members-list/core/search.php:30)

    Having disabled Members List and enabled the other plugin AMR users, I get S2 Member errors only:-

    WARNING: wp-includes/class-wp.php:402 - Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/wp-content/plugins/s2member/includes/classes/cache.inc.php:94)
    WARNING: wp-includes/functions.php:888 - Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/wp-content/plugins/s2member/includes/classes/cache.inc.php:94)

    Does this shed any light to you?

    I have been replying to the development fork thread, but I thought I would jump in here given that I experienced the same problems with:

    Message from webpage
    Ajax Form Error
    Status: Timeout
    Error: Timeout
    Response: (empty)

    I discovered this was an issue with some combination of theme and plugins. I am using Preference, and even though it was designed for 3.5, I can’t get the latest development fork of WPUF to work unless I change themes. I still need to test all my plugins, as well.

    Hi Reticent,

    Your problem may be unrelated but turning on the debug features as mentioned two posts back may provide useful information.

    Also look at error reporting settings as mentioned in my next post

    Hi jonga1306,

    The info you provided is more than useful and has enabled me to determine the source of your problem.

    Your problem is related to both bugs and PHP error reporting.

    For Members List the following lines indicate a bug

    Notice: Undefined index: page in /home/mysite/public_html/wp-content/plugins/members-list/core/search.php on line 30

    The actual lines in code is

    if($_REQUEST['page'] !== 'members-list-configure-search') {
    	return;
    }

    This is actually run on every access to WordPress. The problem is the query variable ‘page’ is not defined on most accesses and hence the error.

    The actual lines should read

    if((!isset($_REQUEST['page']) or $_REQUEST['page'] !== 'members-list-configure-search') {
    	return;
    }

    The same problem exists for this error notice as well

    Notice: Undefined index: page in /home/mysite/public_html/wp-content/plugins/members-list/core/sort.php on line 30

    To fix change

    if($_REQUEST['page'] !== 'members-list-configure-sort') {
    	return;
    }

    to

    if((!isset($_REQUEST['page']) or $_REQUEST['page'] !== 'members-list-configure-sort') {
    	return;
    }

    For s2member the following error is self explanatory.

    Notice: Undefined variable: cache_needs_updating in /home/mysite/public_html/wp-content/plugins/s2member/includes/classes/cache.inc.php on line 94

    Why does this happen when your HotNews theme is enabled? Well I’m guessing its to do with PHP error reporting facilities . Normally default PHP behaviour is NOT to report errors of ‘Notice’ status. However this can be changed by three methods.

    1. php.ini ‘error_reporting’ setting (link1 link2)

    2. Use of the PHP ini_set() function to set ‘error_reporting’

    3. Use of the PHP error_reporting() function

    I’m guessing that the theme developer has used option 2 or 3 for development purposes and forgotten to comment it out.

    So why does this cause a crash. Well this is indicated by the following message.

    WARNING: wp-includes/class-wp.php:402 - Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/wp-content/plugins/members-list/core/search.php:30)

    This line in class-wp.php is part of the standard WordPress function send_headers(). This is normally called to send html headers for each page. However the error in search.php was already triggered before this which resulted in it sending a header previously and hence this error message.

    So why is Frontend triggering this? Well it’s not just Frontend. It’s anything that uses admin-ajax.php for AJAX queries. The AJAX query results in the Member’s List error triggering (during the loading of WordPress bootstrap) and adding an error heading before AJAX adds it’s own header and hence the problem.

    Thread Starter jonga1306

    (@jonga1306)

    Hi prof,

    Thanks so much for all of this. I’ve edited the code as you have suggested for the search and sort.php files – however it now won’t activate the plugin and states:-

    Parse error: syntax error, unexpected '{' in /home/culture/public_html/wp-content/plugins/members-list/core/search.php on line 30

    What I’d really like to do is resolve this issue with the theme error reporting as you have predicted, I’ve searched the theme folder for the function ini_set and error_reporting but have had no results so not sure whether that is the problem.

    I have also spoken to my server administrator and he has indicated that warnings for notices were enabled on the main php config so this could have caused / be causing the problem. I’ll keep testing and report back.

    Thanks again.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘500 Internal Server Error on new post submit’ is closed to new replies.