• Resolved stylise

    (@stylise)


    Hello, I was just notified by a customer that they could not submit the product review form. The error message is “The form could not be submitted. Please notify the site administrator.” All required fields were met.

    We’re on the latest version of the plugin (8.3.2), woocommerce 11.1.2 and wordpress 7.1.2. Any idea what the best steps for troubleshooting might be?

    • This topic was modified 5 days, 3 hours ago by stylise.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Paul

    (@pryley)

    Here is the reason for the error (see “Site Reviews > Help & Support > Common Problems and Solutions” section)

    And if you have to cache the review page for logged in users, make sure the cache expiry is set to less than 12 hours.

    • This reply was modified 5 days, 3 hours ago by Paul.
    Thread Starter stylise

    (@stylise)

    Thanks for the quick follow-up!

    I have fixed the issue and it wasn’t due to anything listed in the documentation. Here’s what happened just in-case anybody else experiences a similar problem.

    My child theme had a snippet that adds a “full-review” category to any review with written content. It ran every time someone submitted a review, and it used wp_create_term() to find or create that category.

    Version 8.3.0, released September 6, changed how review forms submit: it added REST API endpoints for review submission and pagination, and the front end now uses them, falling back to admin-ajax automatically.

    Before that update, submissions went through admin-ajax.php, which loads WordPress’s admin files, so wp_create_term() was available and your snippet worked. From 8.3.0 on, submissions go through the REST API, which doesn’t load those files, so the snippet crashed any review with written content.

    The fix was to change this:

    $term = wp_create_term('full-review', glsr()->taxonomy);

    To this:

    $term = term_exists('full-review', glsr()->taxonomy);
    if (!$term) {
    $term = wp_insert_term('full-review', glsr()->taxonomy);
    }
    • This reply was modified 5 days, 3 hours ago by stylise.
Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.