WordPress.org

Ready to get started?Download WordPress

Forums

Wordfence Security
[resolved] Error on Latest Plugin Update (40 posts)

  1. blogbaladi
    Member
    Posted 4 months ago #

    I just updated wordfence and am getting the below error. Any idea how to solve this? I disabled the plugin and it's gone now.

    Notice: is_404 was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.) in/home/blogbaladicom_vps/blogbaladi.com/wp-includes/functions.php on line 3049

    https://wordpress.org/plugins/wordfence/

  2. Rowina
    Member
    Posted 4 months ago #

    I am having the same problem... help.... i dont want to turn off the plugin but i also dont want people to see this error message...

  3. michaelruk
    Member
    Posted 4 months ago #

    I am getting the error

    After installing the latest version and logging out, I am no longer able to log back in again. The error message says

    Fatal error: Call to undefined function wp_get_current_user() in /websites/123reg/LinuxPackage21/ec/cl/es/ecclesfield-school.com/public_html/news/wp-includes/user.php on line 227

    I can't login to disable the plugin either now

  4. Jon Täng
    Member
    Posted 4 months ago #

    Same problem

    Notice: is_404 was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.) in ...\wp-includes\functions.php on line 3049

  5. Rowina
    Member
    Posted 4 months ago #

    They better fix it fast since we are probably all disabling the plugin and thats very attractive to hackers...

  6. Toshi Yoshida
    Member
    Posted 4 months ago #

    @rowina

    If you don't have a user called admin or administrator then your pretty safe from brute force password attacks. I get lots and lots of those attacks but none has ever used a valid username on my sites.

  7. blogbaladi
    Member
    Posted 4 months ago #

    Why aren't we getting any feedback on this issue?

  8. nsnbc
    Member
    Posted 4 months ago #

    Good question blogbaldi!!! If you can help finding a direct phone number to the company, I will call them and raise h...ll

  9. @nsnbc? If you have a problem with this plugin please start your own topic.

    https://wordpress.org/support/plugin/wordfence#postform

    If you are a "premium" customer of this plugin author then you need to use their site for support.

    http://support.wordfence.com/support/home

    That's because commercial products are not supported in these forums and the plugin authors know they cannot support their customers in these forums.

    http://codex.wordpress.org/Forum_Welcome#Commercial_Products

  10. nsnbc
    Member
    Posted 4 months ago #

    Dembrowski - we HAD to register a premium account in the HOPE to get a more swift response because HERE nobody responded.

    USEFUL ADVISE would be more appreciate than your lecturing which solves absolutely nothing.

  11. TrinitysKitchen
    Member
    Posted 4 months ago #

    Me too. Same problem!

  12. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 months ago #

    nsnbc: All plugins on this site are free, including this one. They come with no warranty and no guarantee of support of any kind.

    If you need support for a plugin that you paid for, then you need to go to the site where you paid for it, not here. This is a free support forum, and complaining and griping here will not get you support any faster, or indeed, at all.

    If you're having a problem with a plugin update that disables the ability to access your site, then I would suggest removing the plugin entirely. You can do this by accessing your website's files via either FTP or SSH, and renaming or removing the plugin's directory. This is the only option to regain access to your site from a broken plugin.

    If you are having problems with "Notice" type messages (which can also prevent you from logging in), then I would recommend disabling the "display_errors" setting on your hosting service. This is a debugging setting in PHP, and should never be enabled on a production site.

  13. nsnbc
    Member
    Posted 4 months ago #

    Samuel Wood (Otto)
    Again, we cannot even log into the admin area. As said before, when we try, we get a failure message:

    Fatal error: Call to undefined function wp_get_current_user() in /home/nsnbc/public_html/wp-includes/user.php on line 209

    Thank you for the advise that we could remove the plugin. Now the question would be HOW? when its impossible to access the website.

    Thanks for your concern

  14. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 months ago #

    Also note that this particular error with plugins causing the "Call to undefined function wp_get_current_user()" was fixed in WordPress 3.7.1.

    The ticket describing the problem is here: https://core.trac.wordpress.org/ticket/25690

    The fix made it into 3.7.1 and all later versions.

    So, are you all running older versions of WordPress? The latest version is 3.8.1, and you should upgrade your WordPress if you are running an older version.

  15. blogbaladi
    Member
    Posted 4 months ago #

    Samuel Wood
    I am running WordPress 3.8.1 and I didnt have this issue before I upgraded WordFence today.

  16. Toshi Yoshida
    Member
    Posted 4 months ago #

    I agree that free plugins come with no warranty and no guarantee of support of any kind.

    However, I would hope that the plugin developer/s keep an eye on the forums. Presumably for many plugins the free user base is much larger than the paid user base. It's much better for them (the developer)to be notified of a possible plugin issue by the free users and perhaps rectify it before it starts impacting their paid users.

    So, the free user base does perform a useful testing service for the developers. Personally if I was a plugin developer, I'd release my plugin to the free community first then release it to the paid community later.

    Anyway, that's all a bit off topic.

    For those with problems you may need to regress to the previous version for now.

  17. nsnbc
    Member
    Posted 4 months ago #

    Thank you Samuel, now we are talking.
    But again, it's impossible to access the website.
    An entirely different issue is that Wordfence claims that its compatible with a lower that 3.7.1 version, but that should be discussed somewhere else, about "accountability issues". ;)
    So now we narrow in to the why - which leaves the all important HOWTO.

  18. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 months ago #

    @nsnbc: As I stated to you before, you will need to use FTP or SSH to access the files on your website itself in order to remove a malfunctioning plugin.

    If you do not have any ability to access the files on your website directly, well, then you're kinda stuck. I mean, the bottom line is that it's your site. You need to be able to manipulate the files on that site.

    WordPress is just software that runs on the top layer of the site. It's a publishing tool, not a file management system. It just gives you a way to easily publish content, it doesn't actually have total control over the site itself.

    If you don't know how to access the files on your site, and you don't know what FTP and SSH mean, then I suggest you contact your web hosting service and ask them for support.

    We do have some information about FTP and such in the codex, but really, this is super-basic first-step kind of stuff. You cannot create a website without manipulating files on the site.

    https://codex.wordpress.org/FTP_Clients
    https://codex.wordpress.org/Using_FileZilla

  19. TrinitysKitchen
    Member
    Posted 4 months ago #

    I am running WordPress 3.8.1 and I didnt have this issue before I upgraded WordFence today.

    Same here...

  20. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 months ago #

    blogbaladi, TrinitysKitchen, I'm sorry that other people seem to have invaded your topic with their own problems. This is why we ask people to post their own topics, so that problems don't get overlooked.

    If you're getting some other message that is not "Call to undefined function wp_get_current_user()", then my response about WordPress versions does not apply to you. The "is_404" message is almost certainly a problem with the plugin instead.

    For you, please see my comment earlier about "display_errors". You need to disable this on your webhost. "Notice" messages should be disabled on your configuration, for security. Error messages like these should be turned off on your web host.

  21. formulaclick
    Member
    Posted 4 months ago #

    I know we all should update to 3.8.1 but due to some reasons of theme or other plugins compatibility, not all of us can do this. The plugin says is compatible since 3.3.1: "Requires: 3.3.1 or higher" and after this update, that is not true. You should modify this if the error will not be fixed.

  22. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 months ago #

    formulaclick: I am not the author of this plugin. If they wish to modify their supported version number, then that is their business.

    I am merely providing information. This is not the only plugin in the directory that could cause that specific problem. If you cannot upgrade WordPress because of some other incompatible code, then you should get rid of the incompatible code and upgrade anyway. Not upgrading leaves you vulnerable to known security risks which are fixed in later versions. And you will increasingly run into problems like these because you are lacking critical core bugfixes.

    Not upgrading is not a valid option. Upgrade. Save yourself the trouble later down the line.

  23. Rowina
    Member
    Posted 4 months ago #

    You have the latest version of WordPress.

    If you need to re-install version 3.8.1, you can do so here or download the package and re-install manually:

    I also have the latest version and still get that message

  24. Rowina
    Member
    Posted 4 months ago #

    @Samuel Wood,
    I have 3.8.1. and i updated my wordfence today
    This is my error message:

    Notice: is_404 was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.) in /..../wp-includes/functions.php on line 3049

    When i disable the plugin it disappears
    Not sure what's wrong and what i need to do. Isn't there some problem with this update that I made? The previous version worked fine.

  25. zoranc
    Member
    Posted 4 months ago #

    Here's a quickfix for the is_404 notices if you want to keep the wordfence plugin running but can't turn off the notices for whatever reason(do try to turn the notices off).

    In the meantime, you can suppress these two is_404 notices and keep them from displaying, using these instructions, until you manage to turn the notices off alltogether, or the wordfence team issues the official update fixing these issues

    Log in to your FTP and edit the following two files:

    1.wp-content/plugins/wordfence/lib/wordfenceClass.php:

    line 270
    change

    if( empty($wfFunc) && is_404() ){
    to
    if( empty($wfFunc) && @is_404() ){

    and

    2.wp-content/plugins/wordfence/lib/wfLog.php:

    line 392:
    change
    (is_404() ? 1 : 0),

    to

    (@is_404() ? 1 : 0),

  26. ackilles
    Member
    Posted 4 months ago #

    That fixed the message for me zoranc. I'm using WP 3.8.1 and the notice appeared immediately after upgrading Wordfence tonight.

  27. zoranc
    Member
    Posted 4 months ago #

    As I said , it is meant as a quickfix to prevent these two specific notices from displaying. It is by no means a permanent solution.

  28. blogbaladi
    Member
    Posted 4 months ago #

    I tried it zoranc and it didn't fix it for me. I ll just wait for wordfence to see if they r gonna fix it anytime soon.

  29. Wordfence
    Member
    Plugin Author

    Posted 4 months ago #

    This is a long thread. Just wanted you to know I'm busy reading it and investigating...

    Will have a response soon.

    Regards,

    Mark Maunder.

  30. Wordfence
    Member
    Plugin Author

    Posted 4 months ago #

    Firstly, thanks very much Otto for weighing in here.

    For the folks that are complaining about this issue, you have the following setting in your wp-config.php file which should not be used in production sites:

    define('WP_DEBUG', true);

    That is the only way that this error can possibly be generated and made visible to your customers.

    I strongly recommend you disable debugging if you're running a production website.

    I'd appreciate it if some of the folks here can confirm that this setting IS in fact enabled in wp-config.php and also give me some insight as to why you would do this. Not looking to hen-peck our users, but I'd like to gain a deeper understanding of how you choose to configure your sites.

    We changed the order in which the logging code is run as a performance enhancement in the newest version and it looks like is_404() is being called too early. So we're working on a fix which will be released shortly.

    Regards,

    Mark.

Reply »

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.