• I updated to the latest 3.4.0 earlier. Came on this evening to do some dev and upon saving my snippet code, I am facing an error ‘Could not update snippet. Request failed with status code 403’. Usually the page refreshes when I click save, so I am presuming the latest update is doing some (faulty) AJAX and breaking the snippet. But I can’t be sure, I have some snippets which are tiny 3-liners, and it lets me ‘Save changes’ on them ok. But for all the bigger snippets (I have around 90) they have the same 403 error above. A quick look at devtools and I am seeing errors like:

    AxiosError XMLHttpRequest

    Any easy way to roll back to previous version until the dev fixed the latest? I have checked their FAQ’s and there is no mention of this.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @stimulant we where reading you before updating the plugin on our website and now we shall wait untill developers check your feedback, untill then, we can recommend you wordpress plugin: WP Rollback, so you can move back to previuos version, it works like charm.

    Hopefully they check this for all of us and let us know if we can update of in they need to fix something on plugin before updating.

    Cheers!

    Thread Starter stimulant

    (@stimulant)

    Hello, I am a paid pro user. I got in touch with them yesterday but still not a peep yet. Will let you know and thanks for the plugin recommendation!

    Thread Starter stimulant

    (@stimulant)

    This is just an update to say that no developer ever got in touch to help resolve this.

    Plugin Author Shea Bunge

    (@bungeshea)

    Hey @stimulant, are you able to provide a screenshot of those errors you mentioned? I’d love to track down what’s causing this bug.

    Plugin Author Shea Bunge

    (@bungeshea)

    Hi @stimulant, just wanting to follow up on this? did you have any updates for us?

    Plugin Author Shea Bunge

    (@bungeshea)

    Hi @stimulant, we’ve introduced a potential fix for this in version 3.4.1. If you’re able to give it a try and let us know whether it fixes things for you, that’d be fantastic.

    Kevin J

    (@iamkevinjohnson)

    403 when saving snippet is still happening:

    “Could not update snippet. Request failed with status code 403”

    Sample snippet that results in 403 when trying to saving new snippet (snippet not activated):

    function custom_redirect($url) {
        ob_start();
        ?>
        <script type="text/javascript">
            window.location.href = "<?php echo ($url); ?>";
        </script>
        <noscript>
            <meta http-equiv="refresh" content="0;url=<?php echo ($url); ?>" />
        </noscript>
        <?php
        ob_end_flush();
    }
    

    It seems to be the echo statement causing the problem. Existing snippets with echo statements still work, but altering/saving existing code that has echo, or creating a new snippet that tries to utilize echo, always results in 403 after attempting to save snippet.

    I have the paid pro version and have contacted support, but they don’t seem to understand the issue yet. Perhaps the above example will help them devise a fix.

    @iamkevinjohnson
    Please start your own topic ( https://wordpress.org/support/plugin/code-snippets/?view=all#new-topic-0 ) instead of asking in someone else’s thread. That way we can keep things in a bit better order. So this thread is for helping the user who posted this topic almost three months ago.
    I’ll leave your comment here, in case you need to refer to it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Latest 3.4.0. AJAX Bug. Cannot save snippets. 403 error.’ is closed to new replies.