• Resolved Vanoisbe

    (@lepapefrancois)


    Hi Mikko,

    I’m using polylang in combinaison with Relevanssi (search plugin).

    On default language (FR), Polylang permalink is set up to return the homepage url without the language directory. So, as I search in default language : the url return http:\\my-website\?s=mysearch and the result are shown.

    When I search in another language than the default one (for example english) : the url http:\\my-website\en\?s=mysearch return no result.
    Because \en\ is added, the search form failed.

    If I set up the language directory to show in permalink even for the default language, the url http:\\my-website\fr\?s=mysearch return no result.
    If I change the polylang parameter “url modification” : no changes
    If I change the permalink from “postname” to “default” : no changes
    If I change the revelanssi option “Limit results to current language” from yes to no : no changes

    If I desactivate Revelanssi, default wp search works in both language.
    If I desactivate Polylang, Revelanssi works.

    I’ve been searching the polylang support, the revelanssi support, the web, for days now. All I can find is old conversation for more than 1 year telling “the problem is fixed”. Apparently, not…

    So what can I do to make this two wonderfull plugin works together ?
    Seems that is “just” a permalink problem…

    My configuration :
    WP 4.2.2, homepage is a static page
    Polylang v 1.7.6
    – with 2 languages FR/NL, FR is default one,
    – “url modification” = “directory name in permalink” -> http:\\my-website\en\
    – default language returns the homepage permalink without language directory
    Relevanssi Version 3.4.2
    – default settings
    – Limit results to current language: yes (but if I change this, the problem is the same)

    The search form is called in the header.php with
    <?php get_search_form();?>
    and the result are shown via search.php.

    https://www.ads-software.com/plugins/relevanssi/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Could I possibly get access to your site so I could debug this? I can’t really say anything without seeing how it works, but I don’t have the time to set up a testing environment.

    Thread Starter Vanoisbe

    (@lepapefrancois)

    Access send to your email address. Thank you.

    Plugin Author Mikko Saari

    (@msaari)

    Problem somewhat solved. The Relevanssi Polylang setting does nothing, because Polylang settings are not correctly set up. The language-based searches return no results, because the posts don’t have the language taxonomy set.

    Thread Starter Vanoisbe

    (@lepapefrancois)

    Dear Mikko, thank you very much for your time and your correct answer.

    For other users, here’s more details.
    =====================================
    My search was restricted to custom post type (no page, no post in the index search). I didn’t set polylang to be active on this custom post type (cpt) because I didn’t need to (my clients needs force me to set one cpt per language).

    As I didn’t activate polylang, the pll_is_translated_post_type() function returns “false” causing the serach to fail.

    So :
    1) activate polylang to the cpt, you want to be indexed for search
    2) set your cpt to a language

    And it works !

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Polylang Relevanssi’ is closed to new replies.