• I’ve been using WP-PostRatings for years on my website (tinywords.com) with no problems. (Note: It’s not being used on any publicly available pages.)

    In the past couple of days, since upgrading to 2.0.0, it has stopped working. Users now get this error when attempting to rate a post:

    Invalid Post ID (#50408)

    The post ID shown is the correct ID for the post in question (I confirmed that by editing the post and viewing the post ID in the URL).

    FYI I’m using the latest version of Chrome on a MacBook. I see the same behavior in Safari and Firefox.

    So something is broken with the ratings widget.

    Is there a fix?

    Thank you!

    • This topic was modified 3 days, 12 hours ago by dtweney.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Thanks for the report — and for confirming the post ID, that helps rule things out.

    One question so I can be sure I’m looking at the right cause: what is the status of post 50408, and where does the rating widget appear?

    1. In the post list in wp-admin, is that post Published, or is it a Draft / Pending Review / Private / Scheduled?
    2. Is it an ordinary Post, or a custom post type added by another plugin or your theme?
    3. Do the people rating it have to be logged in to see the page they’re rating on?

    I ask because 2.0.0 added a check that a post is publicly viewable before it accepts a rating, to stop strangers rating drafts.

    Thread Starter dtweney

    (@dtweney)

    Hi Lester. This is a “pending” post and users need to be logged in to see the page that it appears on. It sounds like that’s the problem.

    Unfortunately, your new feature means that the plugin won’t work for us any more.

    Our use case is this: Ratings and the voting widgets are never displayed publicly. We only use them on private pages, to review submissions.

    The editors vote on incoming submissions (which all come in as pending posts), using a private page that lists those submissions.

    There’s a separate page, also accessible only to editors, that displays posts sorted by rating. That’s how we decide which submissions we want to publish.

    Plugin Author Lester Chan

    (@gamerz)

    Noted, got the AI to fix it for 2.0.1. Just download https://github.com/lesterchan/wp-postratings/archive/refs/heads/master.zip and replace
    1. includes/class-wp-postratings-api.php‎
    2. includes/class-wp-postratings-rating.php‎

    Let me know if it fixes it

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.