WordPress.org

Support

Support » Plugins and Hacks » Relevanssi - A Better Search » [Plugin: Relevanssi] Searching with relevanssi shows all revisions

[Plugin: Relevanssi] Searching with relevanssi shows all revisions

  • After updating Relevanssi to the newest 3.3.1 compatible version Relevanssi now shows a very extensive list of post revisions when performing a search. It’s clearly not intended as these revision links end up in a blind alley so to speak.

    Please note, I am still on WordPress 3.2.1 and have not yet updated to 3.3.1 (I have my reasons). Is this a ‘bug’ because I’m not on the newest WordPress?

    http://wordpress.org/extend/plugins/relevanssi/

Viewing 13 replies - 1 through 13 (of 13 total)
  • I have now updated to the newest wordpress 3.3.1 and the problem persists.

    Plugin Author Mikko Saari

    @msaari

    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.

    Plugin Author Mikko Saari

    @msaari

    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 🙂

    Plugin Author Mikko Saari

    @msaari

    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

    Good find!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: Relevanssi] Searching with relevanssi shows all revisions’ is closed to new replies.
Skip to toolbar