Post-id not valid
-
Hi,
I have this problem: when I try to vote the plugin says “Post-id not valid: post ID #1”I don’t know how to fix it.
Thanks
Alex
-
You are trying to rate a revision or rating a post in the post preview screen?
A published post
In this case, this one.
http://www.passionea300allora.it/motogp-valencia-fp3-iannone-davanti-a-rossi/
Wierd, I check that code, I don’t see how that will happen. That means WP is giving me an invalid post or it is a post revision. Does it work on the default theme with no other plugins activated in the first place?
I can give you another feedback.
This morning I could not vote on an article (another one), but after a couple of hours it worked correctly.
The same for another user on anotther post.
So it seems that it happens only in certain moments.
At the moment I can not switch to the default theme, we’re live with some news and can’t put the site down to test it.
Are you using any caching plugin? If you can’t reproduce the problem, I will not be able to help because on my test site on the default theme it works https://lesterchan.net/wordpress_dev/ so it is a conflict with either a theme or plugin on your end. You need to narrow down the conflicts that is the reason why i asked you to switch to the default theme and no other plugins activated. You can always clone your website to another environment rather than using your live production.
Hi,
no caching plugin. I’m disabling plugins I don’t use anymore but at the moment the error is still present.I also have WP-Polls, which is ajax-based…I wonder if it could be the problem
Nope, my plugins definitely don’t conflict one another. https://lesterchan.net/wordpress_dev/ just added the polls on the sidebar.
If I look at the code I see this
<div id=”post-ratings-1″ class=”post-ratings” itemscope=”” itemtype=”http://schema.org/Article” data-nonce=”339dd9e753″>
is it right “http://schema.org/Article” ?!
That has nothing to do with it. It is for Google Rich Text Snippet.
ok.
Other thing, I forgot to mention it when I installed the plugin.
If I disable/enable it, it says“Il plugin durante l’attivazione ha generato 756 caratteri di output inaspettato. Se si nota un messaggio di “headers already sent”, problemi con i feed o altre tipologie di problemi, si provi a disattivare o rimuovere il plugin.”
Translated in english it’s like “during the activation the plugin sent 756 chars of unaspected output. If you get an “headers already sent” message or some other problems, try to disable/remove the plugin”
Most likely that is a conflict with one of your plugins as I can activate fine on my end. You might need to get the error message https://ww.wp.xz.cn/plugins/debug-plugin-activation-errors/
Ok, this is the error:
[You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘rating_postid INT(11) NOT NULL ,rating_posttitle TEXT NOT NULL,rating_rating INT’ at line 1]
ALTER TABLE wp_ratings CHANGE COLUMN rating_id rating_id INT(11) NOT NULL auto_increment,rating_postid INT(11) NOT NULL ,rating_posttitle TEXT NOT NULL,rating_rating INT(2) NOT NULL ,rating_timestamp VARCHAR(15) NOT NULL ,rating_ip VARCHAR(40) NOT NULL ,rating_host VARCHAR(200) NOT NULL,rating_username VARCHAR(50) NOT NULL,rating_userid int(10) NOT NULL default ‘0’,PRIMARY KEY (rating_id)Hi,
you signed this as resolved but it’s not.
I posted above the code of the SQL error I get, so I’m still waiting for a hint…What version of MySQL You are using?
I recommend Dropping/deleting your wp_ratings table using PHPMyAdmin and reactivate the plugin again. Dropping the table will not affect the ratings.
Sql version: 5.5
Nothing happens dropping and letting the plugin create a new table, same error..
The topic ‘Post-id not valid’ is closed to new replies.