Support » Plugin: Out of the Block: OpenStreetMap » Uncaught Error: Call to undefined function OOTB\wp_json_file_decode()

  • Resolved webadmin641


    WordPress-Version 5.8.6
    Theme: Charity Zone (Version 0.5.4)
    Plugin: Out of the Block: OpenStreetMap (Version 2.0.0)
    PHP-Version 7.4.33

    An Error of Type E_ERROR was found on line 20 in file web/site/wp-content/plugins/ootb-openstreetmap/includes/classes/Helper.php
    Error Message: Uncaught Error: Call to undefined function OOTB\wp_json_file_decode() in web/site/wp-content/plugins/ootb-openstreetmap/includes/classes/Helper.php:20
    Stack trace:
    #0 web/site/wp-content/plugins/ootb-openstreetmap/includes/core.php(57): OOTB\Helper::providers()
    #1 web/site/wp-includes/class-wp-hook.php(303): OOTB\Core\openstreetmap_block_init(”)
    #2 web/site/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
    #3 web/site/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #4 web/site/wp-settings.php(578): do_action(‘init’)
    #5 web/site/wp-config.php(96): require_once(‘/var/www/client…’)
    #6 web/site/wp-load.php(50): require_once(‘/var/www/client…’)
    #7 web/site/wp-admin/admin.php(34): require_once(‘/var/www/client…’)

    Relocating the plugin folder away from the plugin-folder gave me access to log in again.
    I was using auto-update on my installation so this was something I expected to happen some point in time. But obviously it was only happening after some days beyond the actual update.
    The following auto-updates occured:
    06th Dec 2022 – The GDPR Framework (Version 2.0.3 to 2.0.4)
    05th Dec 2022 – Medien-Assistent (Version 3.04 to 3.05)
    03rd Dec 2022 – Autoptimize (Version 3.1.3 to 3.1.4)
    28th Nov 2022 – Out of the Block: OpenStreetMap (Version 1.3.5 to 2.0.0)

    The first issue was triggered on 05th December a few hours after Medien-Assistent was installed when trying to login in admin page.
    Admin logins are a few times a week so it does not necessarily correlate with another plugin.
    I am hesitant to reinstate OOTB right now because of that issue.
    I checked the plugin files for signs of tampering and they are consistent with a manual download.

    thank you for your effort and great plugin (so far)


    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Giorgos Sarigiannidis


    Hello Steffen and thank you for your feedback.
    This is caused because the new version of the plugin uses wp_json_file_decode, which was introduced on WordPress 5.9. I will push an update to address the issue, but in the meantime you can also update WordPress to a version equal or larger than 5.9 (which is advisable anyway, for security reasons). Alternatively, you can downgrade the plugin to it’s previous version.

    Of course, you can also wait for the fix – I will let you know in this topic.

    Plugin Author Giorgos Sarigiannidis


    Hi Steffen,

    v. 2.0.2 of the plugin which was just released, should fix compatibility issues with older versions of PHP and WordPress.

    I still encourage you to update both WP and PHP, but even if you don’t the plugin shouldn’t break your site now.

    Thread Starter webadmin641


    Thank you Giorgos,
    2.0.2 works fine now.
    Gladly, the issue did not break the frontend, only backend was affected.
    I am planning on taking the leap onto 6.x over the holiday when I have a little more chance for fixing if anything breaks.
    Great work on OOTB by the way!
    Very happy with your immediate action also.
    best regards


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Uncaught Error: Call to undefined function OOTB\wp_json_file_decode()’ is closed to new replies.