Support » Plugin: Meta Tag Manager » Be careful with older WP Versions

  • Resolved we-are-ferris

    (@weareferris)


    Works great with latest WP, but older versions (all below 5.0) will cause fatal errors and/or internal server errors because of the use of determine_locale() in meta-tag-manager/classes/open-graph.php which was first introduced in WP 5.0.

    Succesfully tested: 5.8, 5.7, 5.4
    Failed for: 4.9.18

    Supported WordPress Version should be changed in the plugin details tab.

    Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    Thanks for pointing that out.

    Normally we’d just bump the min version given the age of the unsupported version, however we could update the plugin to reflect this, if it’s just a line change.

    Switch determine_locale() for get_locale() and let me know if that works for you. If so, we can do a check and use the new function or fall back into the old one for the next update.

    Thread Starter we-are-ferris

    (@weareferris)

    That should do the job as we used a similar approach to address this issue. For the sake of completeness, I’m going to swap corresponding function(s) in your code and report afterwards.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    Thanks, I wouldn’t test older versions, to be frank, but if it’s a simple line switch and you confirm it does the trick for you, then there’s no harm in changing that to account for get_locale()

    Thread Starter we-are-ferris

    (@weareferris)

    Finally i can confirm, that this solves the issue. After 24 hours, still no error log entries. Also WP debug throws no errors.

    meta-tag-manager/classes/open-graph.php:
    Replaced determine_locale() with get_locale() in lines 40 and 70

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    Thanks for confirming, this will be tweaked for the next update!

    Thread Starter we-are-ferris

    (@weareferris)

    muchas gracias =)
    i mark this as resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Be careful with older WP Versions’ is closed to new replies.