Support » Plugin: Relevanssi - A Better Search » [Plugin: Relevanssi – A Better Search] post_type=page shows also posts – bug in new version

Viewing 12 replies - 1 through 12 (of 12 total)
  • maorb

    (@maorb)

    Update:
    If using –
    http://mydomain.com/?s=pharse&post_type=post&orderby=post_date&order=desc

    It will show ok – only posts and no pages in results, but with parameter post_type=page – it shows both pages and posts in the search results.

    Plugin Author Mikko Saari

    (@msaari)

    That’s actually a WordPress “feature”, and shouldn’t be specific to 2.9.14. Basically, WordPress won’t allow you to do that. Anyway, there’s a solution – change “post_type” to “post_types”, and it should work.

    maorb

    (@maorb)

    Well, it is working as expected with “post_type” parameter on WP3.31 and Relevanssi 2.9.9, so I thought it is some change in Relevanssi.
    I will try to change “post_type” to “post_types” and see how it works.

    Plugin Author Mikko Saari

    (@msaari)

    Hmm, strange, but then again, it’s four versions between those so yeah, I suppose something might’ve changed in between. But ‘post_types’ should definitely work.

    maorb

    (@maorb)

    I checked it, but unfortunatelly, when I use GET parameter like you suggested – ‘post_types=page’ it returns no results at all.
    As I wrote before, using ‘post_type=page’ does show results, but for both pages and posts.

    Plugin Author Mikko Saari

    (@msaari)

    Hard to say – for me post_type=page shows wrong results (because WordPress silently changes the ‘page’ to ‘any’), but post_types=page works just as expected.

    maorb

    (@maorb)

    What else could it be?
    It is very weird, since WP3.3.1 with Relevanssi 2.9.9 works great for me, with post_type=page
    Only after upgrading Relevanssi to 2.9.14 the issue occured, and with 2.9.14 neither post_type=page nor post_type=pages shows expected results.
    What could it also be?
    Nothing else was changed in that site, so I assume it must be something that changed from 2.9.9 to 2.9.14, I just can’t figure out what could else I can check.
    Any more advises?
    Many thanks

    Plugin Author Mikko Saari

    (@msaari)

    Sorry, no idea.

    maorb

    (@maorb)

    So do you say the only way to keep the functionality working is no updating Relevanssi anymore and stay with 2.9.9 , where it works?

    Plugin Author Mikko Saari

    (@msaari)

    Well, the other option is to find out why it’s not working on your site – as it certainly should work (at least using post_types). Are you sure you tried “post_types=page” and not “post_type=pages”?

    maorb

    (@maorb)

    Yes, I’m sure it is “post_type=page” and I re-checked again.

    If you would like to see this, I’d be very happy to send you by mail a link and credentials to view the site on QA server so you would see the issue and test it.
    You may send me your mail to maor[at]maorb.info
    (I just don’t want to write this credentials here in the forums, since it’s a QA site that should not be linked public. )

    Thanks for your patience.

    maorb

    (@maorb)

    Thank you very much @msaari for your quick and accurate help by mail.
    I did have some condition in my search.php file for GET post_type that in first time I didn’t notice.
    So now it’s working well again, you rock!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] post_type=page shows also posts – bug in new version’ is closed to new replies.