I have now updated to the newest wordpress 3.3.1 and the problem persists.
Somebody complained about the same problem before; turned out they were doing something that made the revisions have the wrong post type in the database. So, check your wp_posts database: do revisions have the post type “revision”?
Just checked, all revisions are correctly set to revision under post_type
Maybe reinstalling Relevanssi would be worth a try then?
Hi,
It seems to be an issue where a custom post type has been used e.g. reviews (generated using Custom Post Type UI). The revisions aren’t saved as the post type ‘revision’, but instead are saved as ‘reviews’ with a custom permalink (e.g. 4648-revision).
Thanks
Do you know of a fix besides disabling revisions for the post type AND deleting all previously saved database revisions?
I’ve hacked around with the plugin and done a quick fix. This fix may break some of the other functionality though, so use at your own risk.
In the relevanssi_build_index (around line 2085) function you’ll find the following twice:
AND (
(post.post_status='inherit'
AND post.post_parent=parent.ID)
OR
(parent.ID=post.ID)
)
Replace with:
AND (parent.ID=post.ID)
Then try rebuilding a portion of the index.
That’s a good fix, yes. It’ll break indexing attachments, but if you don’t care about attachments, that’s not going to hurt.
I’ll see about fixing this for good in the next version.
Thanks msaari. I’d normally write something a bit more robust, but it was required on a small project with no budget 🙂
Borntohula, I tried to reproduce the problem, but when I added revision support to my post type, the revisions do have a post_type of ‘revision’.
Can you show me the code you use to register the post type? Could some other plugin be messing with this?
Hi,
There’s a good chance that a plugin is interfering, but at the mo I don’t have the time on the project. In the next couple of weeks I’ll have some time, so will message back in here what the possible issues could be.
Thanks