[Defender Pro] Blank Screen in Backend when trying to open Defender Pro

Hi there, when I try to use defender pro in the website a blank screen appears in the backend of the website. I already activated the debug mode and got the following error:

Fatal error: Uncaught Error: Call to undefined function WP_Defender\Behavior\determine_locale() in /html/wordpress-staging/wp-content/plugins/wp-defender/app/behavior/utils.php:1081 Stack trace: #0 /html/wordpress-staging/wp-content/plugins/wp-defender/app/controller/dashboard.php(413): WP_Defender\Behavior\Utils->createTranslationJson('defender-dashbo...') #1 /html/wordpress-staging/wp-includes/class-wp-hook.php(286): WP_Defender\Controller\Dashboard->scripts('') #2 /html/wordpress-staging/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array) #3 /html/wordpress-staging/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #4 /html/wordpress-staging/wp-content/plugins/wp-defender/wp-defender.php(214): do_action('defender_enqueu...') #5 /html/wordpress-staging/wp-includes/class-wp-hook.php(286): WP_Defender->register_styles('toplevel_page_w...') #6 /html/wordpress-staging/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #7 /html/wordpress-staging/wp-includes/plugin.php(453): WP_Hook- in /html/wordpress-staging/wp-content/plugins/wp-defender/app/behavior/utils.php on line 1081

Can you please have a look? Thanks a lot in advance.

Daniel Kolks

  • Dimitris
    • Support Star

    Hello xmouse

    I can see that the website you selected for this topic is running WordPress 4.9.12, but as you can see in the link below, the “undefined determine_locale() function” as per logs, is introduced to v.5.0.0.
    https://developer.wordpress.org/reference/functions/determine_locale/#changelog

    Is there any specific reason for remaining in the pre-v5 era?
    Please advise!

    Also, keep in mind that our plugins and services are supporting the latest WP version and can’t provide 100% compatibility with previous versions.

    Thank you,
    Dimitris

  • xmouse
    • WPMU DEV Initiate

    Hi Dimitris,

    thanks for your quick answer. At the moment the client doesn´t want to upgrade to wordpress 5 for different reasons. Unfortunately the installation will be running on WP 4.9 for some time.

    Before updating the plugin I took a look in the WP repository and there it says that Defender is compatible for WordPress version 4.6 and higher. So I thought that it shouldn´t be a problem. Is it possible for you to check that and to make it compatible for older versions as well?

    Thanks again.

    Daniel

  • Dimitris
    • Support Star

    Hello xmouse

    Before updating the plugin I took a look in the WP repository and there it says that Defender is compatible for WordPress version 4.6 and higher. So I thought that it shouldn´t be a problem.

    The determine_locale() function isn’t used in the free version as it doesn’t include the Geo-blocking functionality.

    Is it possible for you to check that and to make it compatible for older versions as well?

    I’m afraid that there can’t be any backward compatibility on this part as we only support the latest WP version.

    I’d rather advise re-examining what keeps you back to v.4.9 and find the alternatives that will allow you to update to the latest version. Also, keep in mind that there are several fixes of vulnerability issues that are included in these pending updates.

    Warm regards,
    Dimitris

  • xmouse
    • WPMU DEV Initiate

    Hey Dimitris,

    thanks for your answer – even though it is not what I expected….unfortunately I can´t update that installation. It is not my decision but it is like it is.

    What can I do now other than deinstalling defender pro? It´s a pity that you can´t make it backwards compatible.
    Also I didn´t know that the version requirements differ from the free and the pro version. The problem with this is that I can´t find any information about the dependencies/requirements of the pro version. I can´t find it on the website and I can´t find it in the changelog. It would have been nice to inform people of the version bump in the changelog. Is it possible to add the requirements somewhere so that I don´t have any similar problems in the future? Or do I overlook something here?

    Thanks a lot for your help.

    Daniel

  • Pawel
    • Staff

    Hello Daniel!

    You can find that in our Terms of Service document here: https://premium.wpmudev.org/terms-of-service/#support (see last paragraph of that section). We’re only focusing on latest versions of WordPress not only because of additional work required to support them – we would probably be able to handle that somehow – but because having an old version of WordPress is strongly discouraged, as it is usually a security risk.

    As for the backwards compatibility, I went a bit further and actually recreated the environment you’re working with – Multisite WP 4.9.12 and latest version of Defender. I wanted to check if I can “fake” the missing function, as it seemed possible. It would be a crude hack if it worked, but unfortunately it’s not as simple as I expected to be in the first place. After trying that, my test site went down completely and I had to reinstall it from a backup. So that’s unfortunately not possible to do at this moment.

    Kind regards,
    Pawel

  • xmouse
    • WPMU DEV Initiate

    Hello Pawel,

    thanks a lot for your efforts and checking it out! I really appreciate that.

    As it seems there is no other way than disabling Defender Pro and maybe replace it with the free version of Defender or another replacement. What I would like to know is what happens if I deactivate and deinstall Defender. As far as I can´t have a look in the settings anymore I don´t know what to expect. Will changes – which werde made by defender – remain in the system (database and htaccess)?

    I don´t want to offend you..please understand me correctly…but what I don´t get is that it is possible to develop the free version of Defender with backwards compatibility and to make the compatible WP versions public and that the same isn´t possible for the paid version. For me as someone who has to maintain a lot of client projects this is a major drawback. There are several reasons why it´s not always possible to update to the latest version of wordpress and for me it is crucial to know if a plugin will be compatible or not. Knowing that you will only focus on the latest WP version – for me personally – really makes it risky to use your plugins. Maybe you can take my honest opinion to rethink some of your decisions.

    Thanks a lot

    Daniel

  • Nastia
    • Support Rock Star

    Hello xmouse ,

    I hope you’re doing well!

    What I would like to know is what happens if I deactivate and deinstall Defender.

    The security tweaks that were applied to your site will remain applied, as the Defender adds tweaks to the .htaccess file. Other features, I’m afraid will no longer be active, like Mask Login Area, Two-Factor-Authentication and IP lockouts features.

    what I don´t get is that it is possible to develop the free version of Defender with backwards compatibility and to make the compatible WP versions public and that the same isn´t possible for the paid version

    The premium version of the Defender plugin comes with the GeoLocation feature, it allows blacklisting/whitelisting users IPs based on their location. This feature is using get_locale() function and it was added into the plugin after the WordPress 5.0 was released. As we support the latest WordPress versions, there was no backward compatibility made.

    I’ve checked if there would be a way to modify the plugin, in order to use it with the WordPress 4.9.x but I’m afraid it would require a lot of custom coding. At this moment Defender’s version 2.0.1 and older are the ones that working with the WordPress 4.9.x.

    I’ve forwarded your request to our developers, so they would consider adding backward compatibility for the previous WordPress versions.

    Have a good day and take care!

    Kind regards,
    Nastia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.