Conversation
supportDear support, I have an issue with the search function on the translated versions of my website, that seems to be linked to the Relevanssi Live Ajax Search plugin. I use two types of posts on this website : the default, and a ‘tutorials’ custom post type. My website’s main language is French, and it is translate in English and Spanish with WPML. On the main version of the website everything works properly : I can use the searchbar and click any of the suggested results to access it, or access any result from the search page without any error. When browsing the english or spanish version however, I observe the following : The ajax search results display properly and in the correct language, but whenever I try to access a tutorial-typed post from it, I get a 404 error. The same thing happens when clicking on any tutorial-typed post from the search page. Everytime this occurs, the website returns a 404 for any tutorial page, or archive page related to the tutorial post-type. The 404 does not happen if I access those pages and posts before clicking on any search result. The URLS are correct, and everything works properly with default-typed post. I can tell it’s related to the Relevanssi Live Ajax Search plugin because I tried deactivating every pluging one-by-one, and was able to confirm it only occurs when this one is activated. Do you have any idea of what is causing this behavior, and how I could fix it ? Thank you in advance for your help.
Sorry, no idea, and not even the faintest clue of what the mechanism could be. Did you try deactivating WPML? I wonder if that is related somehow; WPML has a tendency to cause weird problems. I’d need to be able to reproduce this error and study it more closely to even start having an idea what can be causing this.
Thank you for your response. Deactivating WPML doesn’t help because the problem only impacts the translated versions of the website. I can’t reproduce it in any other case, and the translation is a critical feature of the website. I did more investigation on what I could, and observed something interesting : I tried replacing Relevanssi Live Ajax Search with SearchWP Live Ajax Search, and it appears that the bug also occurs with that plugin. This means that the problem might not be caused by Relevanssi Live Ajax Search specifically, but a wordpress feature used by both plugins. I also found what seems to cause the bug on custom post-types : the problem only occurs when the post type’s slug is rewritten (in my case, ‘tutorials’ is rewritten as ‘knowledge-base’ for the urls). If the slug isn’t rewritten, everything works properly. With all those elements, I will contact WPML support and try asking on the main worpdress forum, as it definitely doesn’t seem specific to Relevanssi Live Ajax Search plugin, but common to several plugins doing the same thing. Thank you again for your help. This reply was modified 1 year, 3 months ago by doowayne .
Hope you find the answer. The rewrite stuff can get complicated, that much I can tell from experience.
Sorry, no idea, and not even the faintest clue of what the mechanism could be. Did you try deactivating WPML? I wonder if that is related somehow; WPML has a tendency to cause weird problems. I’d need to be able to reproduce this error and study it more closely to even start having an idea what can be causing this.
Thank you for your response. Deactivating WPML doesn’t help because the problem only impacts the translated versions of the website. I can’t reproduce it in any other case, and the translation is a critical feature of the website. I did more investigation on what I could, and observed something interesting : I tried replacing Relevanssi Live Ajax Search with SearchWP Live Ajax Search, and it appears that the bug also occurs with that plugin. This means that the problem might not be caused by Relevanssi Live Ajax Search specifically, but a wordpress feature used by both plugins. I also found what seems to cause the bug on custom post-types : the problem only occurs when the post type’s slug is rewritten (in my case, ‘tutorials’ is rewritten as ‘knowledge-base’ for the urls). If the slug isn’t rewritten, everything works properly. With all those elements, I will contact WPML support and try asking on the main worpdress forum, as it definitely doesn’t seem specific to Relevanssi Live Ajax Search plugin, but common to several plugins doing the same thing. Thank you again for your help. This reply was modified 1 year, 3 months ago by doowayne .
Hope you find the answer. The rewrite stuff can get complicated, that much I can tell from experience.