• Resolved doolyo

    (@doolyo)


    Hello.
    I have activated a cache plugin called “WP-Optimize”, and when I load the page that has the “Contact Form 7” form, the last request is a “refill” function that is called and it is shown in red with this error (from a browser debugger):

    {
    “code”: “wp_die”,
    “message”: “You are not authorized to perform this action.”,
    “data”: {
    “status”: 500
    },
    “additional_errors”: []
    }

    It takes roughly 300ms and it can take more time. This is not good for many reasons (SEO bad page rank, not clean page returned, …).

    I can see that the file that was called and that produced this error is the following:
    /wp-json/contact-form-7/v1/contact-forms/45/refill

    Do you know about a solution for that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Where can we see the website in question?

    Thread Starter doolyo

    (@doolyo)

    I would prefer not sharing it if possible.
    But you should be able to easily reproduce it.
    You just need to install and activate the “WP-Optimize” plugin which is a cache plugin on one of your installations and you should see the error. Can you please try?

    By the way in the mean time I have found another post describing the exact same error and situation here:
    https://wp-expert.net/blog/fix-for-contact-form-7-refill-issue/

    I checked a bit more and this directory which is accessed does not exist on the website: “/wp-json”, so this is the reason for this error to come up for that “refill” function call.

    I saw a case where the “refill” time of the page took 2 seconds so it can cause issues to many sites where it happens.

    Thread Starter doolyo

    (@doolyo)

    Coming back on this.
    The issue was due to the fact that I was using a security plugin which I wrongly parametered to block the WordPress REST API, which is the “/wp-json” URL, and hence no answer was given for this access and produced this error.

    So it was not related to the “WP-Optimize” plugin at all. It was related to the security plugin.

    When using “AOI WP Security & Firewall” plugin, you need to make sure that the “Wp Security / Miscellaneous / WP REST API” option is unchecked, and then it will work, and this refill issue will not occur anymore, nor any other issue with the form.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Contact Form 7 shows a “refill” error with cache plugin’ is closed to new replies.