• Resolved tonyzyc

    (@tonyzyc)


    Users often report that they cannot submit questions, and the system displays the following error “An error occurred when saving your question. Please report it to the website administrator. Additional information: Data validation error.”

    In the Q & A settings, I did not enable reCAPTCHA, why is this happening, and how can I fix it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    Thank you for using CusRev.

    Did you experience that issue on your end? If you do not enable the reCaptcha v3 so there should be an issue with the ajax on your site.

    You can also follow this solution to troubleshoot the issue https://help.cusrev.com/support/solutions/articles/43000611175-troubleshooting-plugins-and-themes

    Thread Starter tonyzyc

    (@tonyzyc)

    I tried submitting questions on different pages, and I did find that there were some pages that couldn’t submit questions

    I use the WP Super Cache plugin to cache pages, and I found that I can successfully submit questions after deleting the cache, what is the reason for this?

    I used the software to compare the code of the old page and the new page (the page regenerated after deleting the cache) and found that they have two lines of code with different

    Code in the Ask a question section
    New: <button type=”button” data-nonce=”944ea8a1e0″ data-product=”698″ data-crcptcha=”” class=”cr-qna-new-q-form-s-b”>Submit</button>
    Old: <button type=”button” data-nonce=”6ffafa6caa” data-product=”698″ data-crcptcha=”” class=”cr-qna-new-q-form-s-b”>Submit</button>

    Code in the Add an answer section
    New: <button type=”button” data-nonce=”a1f560c17b” data-product=”698″ data-crcptcha=”” class=”cr-qna-new-q-form-s-b”>Submit</button>
    Old: <button type=”button” data-nonce=”3ae92a80c6″ data-product=”698″ data-crcptcha=”” class=”cr-qna-new-q-form-s-b”>Submit</button>

    It seems that only the value of data-nonce is different, and the others are not different

    What’s the problem?

    • This reply was modified 2 years, 5 months ago by tonyzyc.

    Hi,

    Thanks for your additional information.

    Nonces are security tokens in WordPress. They get printed into the HTML source code.
    Nonces can only be used once (number used once), and they are only valid for a certain length of time: 12 hours by default, but developers can change that value.
    On a cached page, the nonce can expire in the background while its ID is still present in the HTML source code of the page. If that happens, the HTML source is referencing an invalid nonce and things break.

    So you can try to contact WP Super Cache support to not cache the product page or the form on this page to avoid this issue.

    Plugin Support cusrev

    (@cusrev)

    We haven’t heard from you for more than two weeks. For this reason, I’ll assume that either you are not interested in this question/problem anymore or it has been resolved. If you still require any help, please start a new forum topic.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Data validation error’ is closed to new replies.