WordPress.org

Ready to get started?Download WordPress

Forums

WP-Members
[resolved] error message, line 134, wp-members.php (5 posts)

  1. GHES
    Member
    Posted 2 years ago #

    The plugin is great and all the helpful tips that come along with it are fantastic.

    One problem, though, accompanied by an error message that reads:

    Notice: Undefined variable: content in /usr/local/pem/vhosts/106347/webspace/httpdocs/wp-content/plugins/wp-members/wp-members.php on line 134

    For the time being line 134 has been commented out while I try and find out what the problem is and whether I can fix it without needing to deactivate the entire plugin.

    Not sure what line 134 does, how necessary it is, whether its deactivation will cause other problems, etc - or whether I can limp along with it commented out.

    Any suggestions would be helpful. Thanks

    http://wordpress.org/extend/plugins/wp-members/

  2. Chad Butler
    Member
    Plugin Author

    Posted 2 years ago #

    That particular line is actually the most important part of the entire plugin as that is what filters the_content through the wpmem_securify function. So, commenting it out will not work.

    You could change it to:

    add_filter( 'the_content', 'wpmem_securify', 1, 1 );

    However, the reason you are getting this message is that you are either running WordPress in debug mode (not a good idea if you don't need to), or you have your php set to show all notices (which you also wouldn't do in a production environment).

    Are you running this on a local machine or is this on a production sever and how familiar are you with your php.ini file?

  3. GHES
    Member
    Posted 2 years ago #

    Thanks Chad for your prompt response.

    I am running WordPress on a production server, however was locked out of my site entirely earlier today, so turned on the debug mode in hope of a hint at what was going wrong.

    The issue, in the end, turned out to be a server problem, but upon getting my site back up (with the debug mode still on) the error message mentioned above appeared. So I am not entirely sure where one problem ends and the other begins.

    Locked out of my database due to too many connections made, it was at first thought a plugin had backfired by continually trying to connect yet fail each time. This, though, wasn't it - it was something to do with the server.

    Thanks, though, for the replacement line, I will try it.

    And I am not familiar with my php.ini file at all. Is there something to be done there?

  4. GHES
    Member
    Posted 2 years ago #

    Brief update: Tried the line you sent - but it broke the site.

    Turned on debug mode again to see why - the message read:

    Parse error: syntax error, unexpected T_IF, expecting T_STRING or T_VARIABLE or '$' in /usr/local/pem/vhosts/106347/webspace/httpdocs/wp-content/plugins/wp-members/wp-members.php on line 140

    Not my wordpress day today.

  5. Chad Butler
    Member
    Plugin Author

    Posted 2 years ago #

    I'm not sure where you are getting that error from (and I don't know if you have made any other changes), but based on what you stated in your original reply, your problem with the plugin is that you are running WP in debug mode.

    You should revert the plugin to its original state and turn off WP debug.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic