• Resolved Paul

    (@paultgoodchild)


    Hi,

    Since your latest update was released, anyone using our Shield Security plugin and wpForo are getting a fatal error. The problem seems to stem from the locale that you’re setting for a user (or for the site).

    We’re using determine_locale() if it’s available (WP 5.0+) or get_locale() which both have various filters and at some point your plugin is causing NULL to be returned from either of these functions. We assume it’s a string since that’s the function’s signature within the WP code and use it in our code as a string, but it throws a fatal error in our code because NULL has in-fact been returned.

    Could you please check your handling of user locale to ensure you’re not supplying NULL for the user or site locales, please? We’ve added mitigation to our plugin for our next release, but to be fair, we should be able to assume that the correct data types are returned from standard WordPress filters.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Paul

    (@paultgoodchild)

    Also, completely separately, could we ask you limit the enqueuing of your plugin assets on WP admin pages that aren’t your own. Specifically:

    • [JS] wpforo-backend-js
    • [JS] wpforo-iconpicker-js
    • [JS] wpforo-font-awesome
    • [CSS] wpforo-admin-css
    • [CSS] wpforo-font-awesome
    • [CSS] wpforo-iconpicker-css

    Styles from wpforo-admin-css are interfering with our plugin admin UI, for example.

    It’s just good practice to limit your assets, wherever applicable, to your own plugin admin screens.

    Plugin Author gVectors Team

    (@gvectors-team)

    @paultgoodchild,
    Thank you for the information. The CSS and JS loading issue is now, we know that it’s not a good practice, it seems something were overwritten in the code, so it loses the non-wpforo page detection. We’ll fix this very soon.

    We’re checking the issue with get_locale()

    Thread Starter Paul

    (@paultgoodchild)

    great stuff, thanks for jumping on this so quickly, really appreciate it!

    Yes, I traced a problem on my Shield plugin to wpforo, it was causing the shield plugin not to work correctly.

    can you post the fix here when you have it please.
    thanks

    Plugin Author gVectors Team

    (@gvectors-team)

    @paultgoodchild,
    Could you please check the wpForo 2.0.3 version for the get_locale() issue?

    • This reply was modified 2 years, 3 months ago by gVectors Team.

    I note this message now if I go to re-activate wpforo. Will I lose any forum data by reinstalling the forum?

    https://i.postimg.cc/T34c35yp/Screenshot-2022-08-05-144949.jpg

    • This reply was modified 2 years, 3 months ago by steviemac.
    Plugin Author gVectors Team

    (@gvectors-team)

    @paultgoodchild,
    Please update to 2.0.4 version, both (get_local() and dashboard JS/CSS affection) issues should already be fixed.

    Thread Starter Paul

    (@paultgoodchild)

    Heya, great, thanks for taking a look into that. It appears to be working normally now with 2.0.4, cheers!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal error in another plugin (Shield Security)’ is closed to new replies.