Support » Plugin: AMP » The setup wizard has experienced an error

  • Resolved metodija

    (@metodija)


    I am getting the following error on the screen when on the wizards page:

    The setup wizard has experienced an error.
    The response is not a valid JSON response. Return to AMP settings.

    In the console, i am getting a number of errors:
    1. /amp/v1/options?_locale=user – 404
    2. Uncaught SyntaxError: missing } after property list admin.php:262:3488 note: { opened at line 262, column 3266

    Do you know why this is the case.

Viewing 5 replies - 16 through 20 (of 20 total)
  • @metodija it doesn’t appear the REST API is working properly on your site/ with your theme, which is why you’re experiencing issues with the setup wizard and AMP settings screen (and Gutenberg) that require it.

    Could you click on the errors on these files in your screenshot and provide screenshots of the errors highlighted in the Sources panel?

    Thread Starter metodija

    (@metodija)

    Hi Renee,
    thanks for your email.
    Those errors are already supplied in the word doc i have sent you.
    Please check the word doc and each error is coped there.

    Do you guys know why this is happening? Can you point to the right direction?

    Thanks

    @metodija thanks for your reply. We do notice some syntax errors being flagged in the code provided when placed in a text editor. For example: https://jmp.sh/qOffMbD

    You may need to reach out to your developer to review this. Since the REST API is needed for wizard and settings, they may need to address ensuring it works properly with your particular theme setup.

    Thread Starter metodija

    (@metodija)

    Hi Renee,
    Thanks for your email and time spent on this.
    I am a developer, have been trying a few things, and i really got to it at the end.
    I will explain how i fixed for the others so they know.
    The culprit was in one of the theme files, the other developers have added a function that removed scripts/css.

    WordPress implements new standard features in the head of the theme that are always on the hook wp_head. If you don’t need them you can easily disable them by using the function “remove_action”
    There are ways where you can remove style css tags:
    add_filter(‘style_loader_tag’

    Script tags using the below:
    add_filter(‘script_loader_tag’

    Ping backs were disabled as well:
    add_filter(‘wp_headers’)
    if (isset($headers[‘X-Pingback’])) {
    unset($headers[‘X-Pingback’]);
    }

    Once i have commented all of this it started working.

    Thanks

    @metodija I’m happy to hear you found a solution and thanks for sharing this insight! It will be useful for others who may experience something similar. All the best with the site and thanks again!

Viewing 5 replies - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.