• demas23

    (@demas23)


    On the latest version of the plugin. I get this error when updating to php 8.

    <br />
    <b>Fatal error</b>: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in /home/jmukpvos/public_html/wp-content/plugins/wp-store-locator/admin/templates/map-settings.php:272
    Stack trace:
    #0 /home/jmukpvos/public_html/wp-content/plugins/wp-store-locator/admin/templates/map-settings.php(272): json_decode(Array)
    #1 /home/jmukpvos/public_html/wp-content/plugins/wp-store-locator/admin/class-admin.php(220): require(‘/home/jmukpvos/…’)
    #2 /home/jmukpvos/public_html/wp-includes/class-wp-hook.php(307): WPSL_Admin->load_template(”)
    #3 /home/jmukpvos/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array)
    #4 /home/jmukpvos/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #5 /home/jmukpvos/public_html/wp-admin/admin.php(259): do_action(‘wpsl_stores_pag…’)
    #6 /home/jmukpvos/public_html/wp-admin/edit.php(10): require_once(‘/home/jmukpvos/…’)
    #7 {main}
    thrown in <b>/home/jmukpvos/public_html/wp-content/plugins/wp-store-locator/admin/templates/map-settings.php</b> on line <b>272</b><br />

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • farroyo

    (@farroyob)

    Hi there!

    Thanks for letting us know. However, the latest stable version of wp store locator (2.2.235) is totally compatible with PHP up to the latest version (8.1.x). Please make sure wp store locator is up to date.

    By the description you provide, the error seems to be triggered by the “Map style” textarea where you can paste your own map styles. It is likely that you have pasted incorrect styles and the plugin is unable to process that information. Please let us know the code snippet you were pasting in that field and we will also try it out to see if we can spot anything.

    Regards!

    mediawaypoint

    (@mediawaypoint)

    Hi there,

    @farroyob

    I have the latest stable version of wp store locator (2.2.235). My live website is on php7.4 and I have just now cloned it into a php 8.1 environment and loaded the backend getting the following error:

    Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\safeagent\wp-content\plugins\wp-store-locator-csv\admin\libraries\parsecsv.lib.php on line 551

    There has been a critical error on this website. Please check your site admin email inbox for instructions.

    The frontend works with warnings but they are theme based. This error above is specifically your plugin.

    Are you sure it is “totally compatible”?

    Cheers

    farroyo

    (@farroyob)

    Hi again!

    Please notice the error you are reporting now belongs to the CSV Manager add-on, not to the core plugin. (wp-content\plugins\wp-store-locator-csv\admin\libraries\parsecsv.lib.php)

    We did update the add-ons when PHP 8 came out to make them fully compatible, so you are likely running an outdated version of the CSV Manager add-on. Please double check.

    However, since it is not allowed to give support to paid add-ons in the public WordPress forums, if you want to receive support about this error you can open a support ticket directly with us and we will gladly help you ??

    Regards,

    mediawaypoint

    (@mediawaypoint)

    Thanks for your help. I wasn’t aware that they were separate entities.

    farroyo

    (@farroyob)

    No problem, we are always glad to help ??

    Thread Starter demas23

    (@demas23)

    Hi Farroyo,

    I don’t currently have any styles pasted in that section.

    So I added some random text to that section to see if it would give me an error on the backend, and it did.

    I removed the text, then saved the page. Then I switched to php8 and everything is fine, no template errors on that page. I thought maybe that was a fluke, but I tried the same thing on another site and it doesn’t have the error now either.

    Not sure what that was all about, but now it’s working.

    farroyo

    (@farroyob)

    Hi again,

    Well, it is kinda weird indeed, but I’m glad everything is up and running for you now ??

    We remain at your disposal if you need help in the future.

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Error when Updating to PHP 8’ is closed to new replies.