• Resolved Gustavo Troisi

    (@gustavotroisi)


    Hello, how could I hide the form from registered users who have already submitted a review in a particular post, but not in the other posts?
    Many thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    First, make sure the you are assigning your reviews.

    Next:

    Thread Starter Gustavo Troisi

    (@gustavotroisi)

    Thanks, but this did not solve the problem. I need users to rate different posts, but only once each. I use this shortcode:

    [site_reviews_form assigned_posts=”post_id” assigned_users=”user_id”]

    And added the two filters you mentioned, and once I make the firts rate, then all other posts show the same message: ‘Thank you for your review!’

    Plugin Author Gemini Labs

    (@geminilabs)

    Are you using the “Limit Reviews” setting? And if so, have you also set the new “Restrict Limits To” setting since you are assigning reviews?

    Thread Starter Gustavo Troisi

    (@gustavotroisi)

    First I used the “Limit Reviews” to “By Username” and checked “Assigned Posts” and “Assigned Users” from “Resctict Limites To” setting. But when noted that didn’t work I put it in “No Limit” just to test, but I got the same results. Also tried to remove all Reviews and empty the trash, and also “Reset Assigned Meta Values” from Tools and made sure the database tables glsr_* were empty. I am testing at localhost, that could be a problem? Thanks again

    Plugin Author Gemini Labs

    (@geminilabs)

    Are your pages cached by any chance? If so, you may be seeing the cached version of the page.

    Thread Starter Gustavo Troisi

    (@gustavotroisi)

    No, no cache. Now I activated the “Limit Reviews” option to “By Username”, and removed the second filter. The form is shown at all posts, and if I send another review to a post I reviewed before, it shows ‘You’ve already send a review’, and if I send in a new post it sends it. And all posts appear in ‘All Reviews’ from the admin. This works perfect.
    It seems that the problem is when detecting if the user has already made a review, in the second filter that appears in the FAQ as you mentioned..

    Plugin Author Gemini Labs

    (@geminilabs)

    Are you using any caching plugin? Perhaps your SQL queries are being cached?

    The Review Limits validator is used exactly the same way when submitting a review.

    https://github.com/pryley/site-reviews/blob/a47b2fe3248b218c785d0755ac1fcc9f8b4a52a1/plugin/Modules/Validator/ReviewLimitsValidator.php#L28-L36

    Thread Starter Gustavo Troisi

    (@gustavotroisi)

    It is weird, certainly it is because a incompatibility with another plugin. Anyway I will try to make a custom check method, thanks for your time!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Hide form’ is closed to new replies.