Support

Admin Tools

#41409 gtranslate.io compatibility

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
4.4.9
PHP version
8.2.0
Admin Tools version
7.6.2

Latest post by nicholas on Thursday, 05 December 2024 00:59 CST

lascuderia

Hi,

 

We are trying to get gtranslate to work with Akeeba Admin Tools. It seems like the request is not even reaching gtranslate, so im suspecting something is being blocked by your rules. Have you seen this before and if so, what rules are causing this?

 

Thanks!

nicholas
Akeeba Staff
Manager

Hello Frank,

As per our email exchange last night, I can see that the translation JavaScript gets a 403 when trying to access your site's frontend page. This sends me down to a specific troubleshooting path.

The first thing I try in these cases is going to Admin Tools, .htaccess Maker and setting “Protect against clickjacking” to No. Then click on Save & Create .htaccess in the toolbar. The idea is that most of those tools use an IFRAME, and this setting blocks displaying your site in an IFRAME.

The next thing I'd try is setting the “Cross-Origin Resource Sharing (CORS)” to “Explicitly Allowed” and regenerate the .htaccess. This allows your site to be loaded from JavaScript running in a different domain or subdomain than your site. For the gory details see the CORS documentation on MDN.

If this still doesn't help, the next thing to try is setting “Block access from specific user agents” to No and regenerate the .htaccess. The idea is that the third party service you are using (GTranslate.io) needs to fetch your site's content somehow, translate it, and send it back to your site. When they fetch your site's content they do an HTTP request which has a User-Agent string. If that's one of the blocked ones, you get a 403.

Beyond that, the only other setting I can guess might be relevant is “Prevent content transformation” which I would try disabling. This tells proxies to not modify the content of the site. This is normally used to prevent JS and CSS from being minified and compressed by a CDN or caching proxy (e.g. Varnish), and to avoid double compression issues with pre-gzip'ed HTML content generated by Joomla. However, the no-transform HTTP header may be interpreted by the translation proxy as a forbidding factor to translation (translating does change the content by definition) which might cause it to return a 403. I am not sure that's the case, or whether it would make sense.

Beyond that, you get to do troubleshooting the old-fashioned way. Start disabling options one-by-one until you find which one was causing the problem, then try to figure out why it did that and whether you need to adjust something else in your site or server to avoid that being a problem.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!