Forum Archive - My users cannot use the Search with GTranslate

My users cannot use the Search with GTranslate
Jun 21, 2016 9:01 am by Sbenny
It's me, one more time. This time I'm having problems regarding the AJAX search feature of my website. If I visit my website, I have no problems using it, but if I try to use a subdomain pointing to your server, when I use the search feature, a weird error came up: http://image.prntscr.com/image/5fbcbd19833a4aa8aca603e976cc39d5.jpeg There are no relevant details in the error screen, but I guess it's something about the postponed translation made to search results? Thanks in advance. PS: This forum needs some tweaks, the image I posted is being cut because there are few css bugs, please let me know, I could help you.
Re: My users cannot use the Search with GTranslate
Jun 21, 2016 10:28 am by Yana
Hi, To fix the icons problem add the following lines to your .htaccess file <FilesMatch "\.(ttf|ttc|otf|eot|woff)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch> Please check the documentation to find more info about JSON format translation. https://gtranslate.io/docs/58-gtranslat ... umentation
Re: My users cannot use the Search with GTranslate
Jun 21, 2016 11:47 am by Sbenny
The lines you mentioned are already into my .htaccess, also, I didn't mention anything regarding icons problem. The problem I have is another.
Re: My users cannot use the Search with GTranslate
Jun 21, 2016 8:26 pm by Edvard
Hi, When you make a search, your website sends an ajax request to: http://it.sbenny.com/index.php?option=c ... 6540643387 which then responds with javascript content. However the Content-Type header is set to text/html which is being considered as a content for translation. To prevent that, you will need to modify com_universal_ajax_live_search component and set correct Content-Type header, in this case it is going to be application/javascript. Thanks!
Re: My users cannot use the Search with GTranslate
Jun 22, 2016 4:11 pm by Sbenny
I made a search between files inside that component, and the Content-Type header is not set in any of the files of the component. Do I have to add it manually?
Re: My users cannot use the Search with GTranslate
Jun 22, 2016 5:48 pm by Edvard
Yes, default is text/html if it is not set. So you will need to set it specially to be application/javascript for the mentioned request. Thanks!
Re: My users cannot use the Search with GTranslate
Jul 7, 2016 11:42 am by Sbenny
Would it be possible to get some additional support about how to do it? I could send by mail the component files if you'd like to help me and I'd really appreciate it!
Re: My users cannot use the Search with GTranslate
Jul 11, 2016 3:07 pm by Edvard
Hi, It will be right to ask the search extension developer to have a fix for it. If that doesn't work, please use our contact form and send your FTP access details and we will try to fix it for you. However you need to remember that you should not update the search extension to not break it again. Thanks!

SIMILAR TOPICS

Gtranslate MultisiteFeb 12, 2019 7:27 amReplies: 1Post by: infact_dat
Gtranslate: Error with numberFeb 20, 2019 1:20 amReplies: 1Post by: infact_dat
GTranslate 3.7.4, Joomla 3.9.3 - doGTranslate is not definedFeb 22, 2019 12:34 pmReplies: 1Post by: oase
Add-on gtranslate no longer worksFeb 2, 2019 6:01 amReplies: 1Post by: DarylDixon
Instragram and Gtranslate...!!!!Dec 19, 2018 11:18 amReplies: 1Post by: zackfernandes

Try GTranslate with a free 15 day trial