- This topic has 11 replies, 2 voices, and was last updated 8 years, 7 months ago by reggiedunlup.
-
AuthorPosts
-
February 3, 2016 at 12:43 am #7566reggiedunlupParticipant
Hi Again,
I recently installed “Transposh” plugin to translate my website. It worked like a charm until I tried to perform a search when language is set to english.
Default language is french. When performing search in french, everything is perfect.
I have 2 search instances:
The first one is supposed to search everywhere but in custom field “cp_je_recherche_en_change”.
The second one is searching only in custom field “cp_je_recherche_en_change”.
In french everything is perfect, but once in english, both seems to look at the same place!
Any idea?
Thanks in advance!
Bryan
February 3, 2016 at 9:41 am #7570Ernest MarcinkoKeymasterHi Bryan,
Currently Qtranslate and WPML translate are the translate plugins officially supported, others might cause issues, although they usually work without issues. I cannot promise it’s going to work correctly with this one.
However I did a debugging on the queries, and they are doing exactly what you described. The first one looks in the title, content etc.. but not in that custom field, and the other one looks only that custom field. It’s 100% correct and working. What is the problem exactly? The results must be the correct items, as the query is correct. Is there something with the language?
February 3, 2016 at 1:21 pm #7576reggiedunlupParticipantHi Ernest,
The problem is when you select english as the language in upper right corner, the searches are not working properly, they both looking at the same place!
By the way, my first try was using qtranslate-x and then I bought wpml, both were a mess since a bunch of stuff was really heavy to configure (like the text in your search button)!
With Transposh, everything were done within an hour! Only thing that doesn’t work perfectly is the english version of the search instances.
Please advise if something can be done!
Regards,
Bryan
February 3, 2016 at 1:29 pm #7578Ernest MarcinkoKeymasterI’m still confused about this.
I see 2 products overall, one under Drivers one under Equipment Audio. If open both items, no matter which language I choose, they are both the same. Exactly the same content, everything the same. I’m not sure what the search should look for in difference between the languages, as in both cases the content is the same.
Can you give me an example of what should I look for, which search instance to try and what should be (or shouldn’t be) the result?
February 3, 2016 at 1:36 pm #7581reggiedunlupParticipantOn the ‘I’M LOOKING FOR’ try searching for “mirage”, it is supposed to get 1 result. Same word in second search bar “I want to offer” suppose to get no result.
If you try to search for “compresseur” in first search instance it is supposed to return no result and if you try it in the second search instance you are supposed to get 1 result.
“Mirage” is in the title and content and “compresseur” is in custom field.
Hope it is clear!
Bryan
February 3, 2016 at 1:46 pm #7582reggiedunlupParticipantOn last detail, since it is an ad site, ads are not translated, if someone write his ad in french, it won’t be translated, but the searches must look into all ads, whatever the selected language…
February 3, 2016 at 1:57 pm #7583Ernest MarcinkoKeymasterOkay, so I have found out why. On the english site the $_POST data sent by the search is completely missing – meaning something clears it before it reaches the search handler. This data is essential to determine which search instance should be used and what the options are.
I have tested to check if the $_POST data exists before plugin loading (in wp-config.php), and it does – meaning it’s not the fault of ajax search pro. This means that one of the other plugins completely wipes the content of the $_POST variable. The bad news is, that I literally cannot do anything about this. There is no way to bypass this method or temporary store it. The only way is to find the code responsible of manipulating the $_POST data and either fix it or deactivate it.
February 3, 2016 at 2:03 pm #7584reggiedunlupParticipantOk… who would be the best person to check for that? Transposh plugin author?
Thanks
Bryan
February 3, 2016 at 2:10 pm #7585Ernest MarcinkoKeymasterIt might not be the Transposh plugin at all. Let me try to trace it back. I might be able to find it for you.
February 3, 2016 at 2:20 pm #7586reggiedunlupParticipantIt would be great!!
Thanks!
Bryan
February 3, 2016 at 3:01 pm #7587Ernest MarcinkoKeymasterI think I might have found the source of the problem, and it’s actually a redirection within the transplosh plugin. I don’t fully understand of course, but there are several redirections, I guess to get to the correct translation page. This redirection however causes to empty the $_POST variables..
I have found a solution however, I have added a few lines of code to the search plugin to avoid this redirection if possible (by detecting the language and such), so the $_POST remains in tact. I won’t be able to make a permanent solution out of this unfortunately, so please do not update the plugin if you plan to use transplosh in the future, otherwise these changes will be lost.
February 3, 2016 at 3:24 pm #7588reggiedunlupParticipantErnest,
It works perfectly! Thanks a lot!!
Noted, I won’t do any Transposh update.
You really diserve a 5 stars rating!
Thanks again!
Bryan
-
AuthorPosts
- The topic ‘Transposh search problem’ is closed to new replies.