GTranslate plugin don't translate recently. Topic is solved
Moderators: pe7er, General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
-
- Joomla! Explorer
- Posts: 426
- Joined: Mon Oct 08, 2012 4:45 am
Re: GTranslate plugin don't translate recently.
Guys
I redo the website starting from J! 3.9.28 and found the cuplit. I think I now understand a little better the hardship of pe7er & team in developing the 3.10.xx series. My humble apology.
In my case it was 2 older extensions that relying of MooTools (mooquee). One of the extension has option to switch to jquery. Once i avoid MooTools in the site, gTranslate do translate.
In fact with MooTools out of the way update to 3.10.3 is good for gTranslate.
There is one more site I have not been able to find the culprit YET. Gurus any way to speed up the search. I did the hard way by rebuilding from mysql database.
I redo the website starting from J! 3.9.28 and found the cuplit. I think I now understand a little better the hardship of pe7er & team in developing the 3.10.xx series. My humble apology.
In my case it was 2 older extensions that relying of MooTools (mooquee). One of the extension has option to switch to jquery. Once i avoid MooTools in the site, gTranslate do translate.
In fact with MooTools out of the way update to 3.10.3 is good for gTranslate.
There is one more site I have not been able to find the culprit YET. Gurus any way to speed up the search. I did the hard way by rebuilding from mysql database.
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: GTranslate plugin don't translate recently.
I have explained earlier in this thread that if you search the files in your website and you find the text "behavior." then you have found something that uses MooTools. Then you need to look at the folders that these files are located in. If you find folders that relate to extensions—components, plugins, modules, templates or libraries—that you installed, then disable these extensions, one by one, until your GTranslate plugin works. That's how I would find the culprit.
-
- Joomla! Explorer
- Posts: 426
- Joined: Mon Oct 08, 2012 4:45 am
Re: GTranslate plugin don't translate recently.
@sozzled Bro
Now I am starting to understand your sincere effort to teach me how to find the culprit. I went the long way only then I fully understand the meaning of ‘behavior’; you were ever kind enough to spell it out to avoid my mistake.
The gTranslate developer tells me mooTools behaviour will cause gTranslate not to work. When I look at helper.php of the culprit I see the text 'behavior' together with 'moo'. Hence can I just search 'moo', it give a smaller list of .php files.
By the way are you aware of a nice & simple marquee extension that don’t use MooTools. Sorry to bug you with this. Thank you & full of appreciation.
Now I am starting to understand your sincere effort to teach me how to find the culprit. I went the long way only then I fully understand the meaning of ‘behavior’; you were ever kind enough to spell it out to avoid my mistake.
The gTranslate developer tells me mooTools behaviour will cause gTranslate not to work. When I look at helper.php of the culprit I see the text 'behavior' together with 'moo'. Hence can I just search 'moo', it give a smaller list of .php files.
By the way are you aware of a nice & simple marquee extension that don’t use MooTools. Sorry to bug you with this. Thank you & full of appreciation.
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: GTranslate plugin don't translate recently.
1) I use Windows GREP to search for text within files.
2) I am not interested in marquee extensions.
2) I am not interested in marquee extensions.
-
- Joomla! Explorer
- Posts: 426
- Joined: Mon Oct 08, 2012 4:45 am
Re: GTranslate plugin don't translate recently.
You are RIGHT
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: GTranslate plugin don't translate recently.
By the way, I looked around at that "mooquee" thing and found an extension called Simple Mooticker that was designed for J! 1.5. So, when you're talking about "an older extension", you could be talking about something developed more than 10 years ago that pre-dates J! 3.0, like unexploded ordnance waiting to be detonated. It may have been pure coincidence that your recent update to J! 3.10 detonated that bomb.
Here's some https://www.developer.ps/moo/mooquee/changeLog.txt that I discovered about "mooquee":
Code: Select all
---------------------------------
mooquee - ChangeLog
WwW.developer.ps/moo/mooquee
---------------------------------
v1.1. 2009-01-30
- pause on mouse over container
v1.0. 2008-10-20
- added sod top, bottom direction extenstion (www.Sod.hu )
- update code to work with mootools v 1.2
- included a compressed version of mooquee
v0.2. 2008-01-25
- added the changeLog file to the package
- added a new variable "steps" to help speed the movement
- deleted the variable "marSpacing" because it has no use :)
v0.1. 2007-09-05
- modified the code to accept percentage in width
It may be a good opportunity to undertake a software audit of your website.
-
- Joomla! Explorer
- Posts: 426
- Joined: Mon Oct 08, 2012 4:45 am
Re: GTranslate plugin don't translate recently.
Thatis what I see during the rebuilding .. mine field clean up
-
- Joomla! Explorer
- Posts: 426
- Joined: Mon Oct 08, 2012 4:45 am
Re: GTranslate plugin don't translate recently.
I caught the final culprit in the 4th website by searching for 'moo' in all .php files using Total Commander, the positive list was shorter. On digging on the 4th positive find .php i found it was related to the extension "Attachment". I then uninstal the extension, what follows gTranslate work.
I have a look at GREP GUI version as i am not familar with Linux. I am happy with TCom as i can do FTP with a simple connection with IP address.
I have a look at GREP GUI version as i am not familar with Linux. I am happy with TCom as i can do FTP with a simple connection with IP address.
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Windows Grep; Attachments and MooTools
Fantastic. If you found those mongrels using Total Commander then it's done a good enough job for the time being. FYI, you can obtain Windows Grep—it's free—here: https://windows-grep.en.uptodown.com/windows. It's saved my life on dozens of occasions.
When you say that you discovered some extension involving the name "Attachment" are you referring to Attachments (last updated four years ago) which scores five out of five according to user reviews? Maybe you might post your own review of this product and inform the developer about using MooTools in the frontend? I checked the source code on GitHub and Attachments—originally developed for J! 1.5 but ported over time to J! 3.x) still uses MooTools in a dozen places.
When you say that you discovered some extension involving the name "Attachment" are you referring to Attachments (last updated four years ago) which scores five out of five according to user reviews? Maybe you might post your own review of this product and inform the developer about using MooTools in the frontend? I checked the source code on GitHub and Attachments—originally developed for J! 1.5 but ported over time to J! 3.x) still uses MooTools in a dozen places.
-
- Joomla! Explorer
- Posts: 426
- Joined: Mon Oct 08, 2012 4:45 am
Re: GTranslate plugin don't translate recently.
Bro you are right it is attachments with an 's'.
The new version 3.2.6 has no moo issue so gTranslate works.
I am not sure what version was hiding in the closet and what i meant to use it for!
The new version 3.2.6 has no moo issue so gTranslate works.
I am not sure what version was hiding in the closet and what i meant to use it for!
-
- I've been banned!
- Posts: 13639
- Joined: Sun Jul 05, 2009 3:30 am
- Location: Canberra, Australia
Re: GTranslate plugin don't translate recently.
My motto is "Use it or lose it". If you installed something, buried away, and you don't know what it is (or was) used for, chuck it out. OK?
I never used that Attachments because I never had any need for it. A lot of people (220 reviews), however, love it (or loved it) enough to give it five stars out of five. Lesson: keep your extensions up to date!
I never used that Attachments because I never had any need for it. A lot of people (220 reviews), however, love it (or loved it) enough to give it five stars out of five. Lesson: keep your extensions up to date!
-
- Joomla! Explorer
- Posts: 426
- Joined: Mon Oct 08, 2012 4:45 am
Re: GTranslate plugin don't translate recently.
YES sirgetting late down the globe .. time to take a rest
-
- Joomla! Fledgling
- Posts: 4
- Joined: Wed Sep 24, 2014 10:18 pm
Re: GTranslate plugin don't translate recently.
Hi, I've found this plugin to somewhat help in disabling Mootools:
https://digitaldisseny.com/en/joomla-ex ... -conflicts
Good luck!
https://digitaldisseny.com/en/joomla-ex ... -conflicts
Good luck!
-
- Joomla! Fledgling
- Posts: 4
- Joined: Wed Sep 24, 2014 10:18 pm
- darb
- Joomla! Hero
- Posts: 2042
- Joined: Thu Jul 06, 2006 12:57 pm
- Location: Stockholm Sweden
Re: GTranslate plugin don't translate recently.
Change this google translator to another translator that works with latest Joomla without Mootools is the best way forward. Edvard Ananyan the GT translator dev have many other projects he focus on but talk directly to him for updates.
Mootools have been a disaster since the debate over Jquery and Mootools and have created sooo many problems for users with this not good decision to use Mootools over the years.
Your complaint is just one of thousands that have had historical problem with these js conflicts driving away people from Joomla to Wordpress instead. One of Joomlas worst strategic decision ever...
Mootools have been a disaster since the debate over Jquery and Mootools and have created sooo many problems for users with this not good decision to use Mootools over the years.
Your complaint is just one of thousands that have had historical problem with these js conflicts driving away people from Joomla to Wordpress instead. One of Joomlas worst strategic decision ever...
-
- Joomla! Apprentice
- Posts: 9
- Joined: Thu Oct 27, 2016 3:54 pm
Re: GTranslate plugin don't translate recently.
We were having same issues. Some we managed to get working again by removing dated plugins but others not. Hired a js professional via Upworks and he fixed my issues
This was our root problem with Mootools-core being outdated from Joomla.
His fix for us is:
1. locate mootools-core in media/system/js folder
2. open mootool-core
3. Search for a?[]:f.isEnumerable(a)&&"string"!=typeof a?"array"==b(a)?a:e.call(a):[a]}
4. Remove
5. Save
Apparently on new joomla install this has been removed/fixed?
This was our root problem with Mootools-core being outdated from Joomla.
His fix for us is:
1. locate mootools-core in media/system/js folder
2. open mootool-core
3. Search for a?[]:f.isEnumerable(a)&&"string"!=typeof a?"array"==b(a)?a:e.call(a):[a]}
4. Remove
5. Save
Apparently on new joomla install this has been removed/fixed?
-
- Joomla! Apprentice
- Posts: 7
- Joined: Thu Jul 14, 2011 7:50 am
Re: GTranslate plugin don't translate recently.
Thanks it worked for me, Gtranslate works fine now however it affects in administrator, it stopped showing different tabs for article. It justs shows 'content' tab now. Any idea about this tab issue?
Thanks,
Zack
Thanks,
Zack
aptol1952 wrote: ↑Wed Nov 24, 2021 1:27 pmWe were having same issues. Some we managed to get working again by removing dated plugins but others not. Hired a js professional via Upworks and he fixed my issues
This was our root problem with Mootools-core being outdated from Joomla.
His fix for us is:
1. locate mootools-core in media/system/js folder
2. open mootool-core
3. Search for a?[]:f.isEnumerable(a)&&"string"!=typeof a?"array"==b(a)?a:e.call(a):[a]}
4. Remove
5. Save
Apparently on new joomla install this has been removed/fixed?
-
- Joomla! Apprentice
- Posts: 9
- Joined: Thu Oct 27, 2016 3:54 pm
Re: GTranslate plugin don't translate recently.
Thank you for noticing, we do not use content/article but K2. But when we find a solution we will share ofcourse
-
- Joomla! Apprentice
- Posts: 7
- Joined: Thu Jul 14, 2011 7:50 am
-
- Joomla! Apprentice
- Posts: 9
- Joined: Thu Oct 27, 2016 3:54 pm
Re: GTranslate plugin don't translate recently.
we applied fix in index of template
<?php $doc = JFactory::getDocument();
unset($doc->_scripts[$this->baseurl.'/media/system/js/mootools-core.js']); ?>
<?php $doc = JFactory::getDocument();
unset($doc->_scripts[$this->baseurl.'/media/system/js/mootools-core.js']); ?>
-
- Joomla! Explorer
- Posts: 310
- Joined: Tue Mar 24, 2009 12:30 pm
Re: GTranslate plugin don't translate recently.
I've just realized that GTranslate doesn't respond any longer (Joomla 3.10.3). It has worked earlier, but I can't say how long time ago and with which upgrade of Joomla this problem appeared.
I disabled GTranslate and installed SEF Translate, which also use the Google Translate API. The result was the same.
I found this thread showing that the problem with GTranslate could be related to Mootools. Even at the support forum of Orda SoftMoostools is "blamed" for the problem and they advice to install and use Mootools Enabler/Disabler extension.
After the Mootools has been disabled, then GTranslate and SEF Translate begin to work again, but with mootools disabled then Modals extension of Regular Labs stopped to work The site depends on using Modals, so I had to enable Mootools again, since the translation function is not equal important but nice to have working.
The developer of the Mootools extension writes.
Mootools option Disables 4 js files - around 330 kB
media/system/js/caption.js
media/system/js/mootools-core.js
media/system/js/core.js
media/system/js/mootools-more.js
(https://www.extensionbase.com/joomla-di ... tools.html)
Any idea if one can make any of the two Google Translate extensions to work without disabling Mootools?
I disabled GTranslate and installed SEF Translate, which also use the Google Translate API. The result was the same.
I found this thread showing that the problem with GTranslate could be related to Mootools. Even at the support forum of Orda SoftMoostools is "blamed" for the problem and they advice to install and use Mootools Enabler/Disabler extension.
After the Mootools has been disabled, then GTranslate and SEF Translate begin to work again, but with mootools disabled then Modals extension of Regular Labs stopped to work The site depends on using Modals, so I had to enable Mootools again, since the translation function is not equal important but nice to have working.
The developer of the Mootools extension writes.
Mootools option Disables 4 js files - around 330 kB
media/system/js/caption.js
media/system/js/mootools-core.js
media/system/js/core.js
media/system/js/mootools-more.js
(https://www.extensionbase.com/joomla-di ... tools.html)
Any idea if one can make any of the two Google Translate extensions to work without disabling Mootools?
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sun Mar 05, 2017 3:51 pm
Re: GTranslate plugin don't translate recently.
Guys, I'm going through the same problem. I did some tests here and it has nothing to do with new version of joomla. You can try there on Joomla 3.9.x or earlier. Tested on old versions of joomla: it doesn't work anymore.
Nor is GTranslate's fault. GTranslate just uses this: https://www.w3schools.com/howto/howto_g ... nslate.asp .
In other words, GTranslate only uses the Google API script. The problem happens in the Google API's Javascript. They were the ones who changed recently and now there is conflict with mootools. Before, it didn't.
Just at that point there is an error: "new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element')";
At that point a constructor is called and a request should open correctly: "https://translate-pa.googleapis.com/v1/ ... terator%5D' " But this request is not done correctly, because there is an object there in the URL that was not destroyed correctly. The mootolls get in the way in some way. The correct one should be something like: "https://translate-pa.googleapis.com/v1/ ... k=callback" Note that some client parameters are correctly passed as keys.
The question now is: how do we talk to the team that worked on this script: https://translate.google.com/translate_a/element.js?
Nor is GTranslate's fault. GTranslate just uses this: https://www.w3schools.com/howto/howto_g ... nslate.asp .
In other words, GTranslate only uses the Google API script. The problem happens in the Google API's Javascript. They were the ones who changed recently and now there is conflict with mootools. Before, it didn't.
Just at that point there is an error: "new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element')";
At that point a constructor is called and a request should open correctly: "https://translate-pa.googleapis.com/v1/ ... terator%5D' " But this request is not done correctly, because there is an object there in the URL that was not destroyed correctly. The mootolls get in the way in some way. The correct one should be something like: "https://translate-pa.googleapis.com/v1/ ... k=callback" Note that some client parameters are correctly passed as keys.
The question now is: how do we talk to the team that worked on this script: https://translate.google.com/translate_a/element.js?
-
- Joomla! Explorer
- Posts: 310
- Joined: Tue Mar 24, 2009 12:30 pm
Re: GTranslate plugin don't translate recently.
Thanks weltonwms for clarifying that the problem is caused by fault in the API of Google Translate.
-
- Joomla! Apprentice
- Posts: 7
- Joined: Thu Jul 14, 2011 7:50 am
Re: GTranslate plugin don't translate recently.
This problem is with Google's translate APIs. We can't do anything with Google's API JS changes so have to do some hacks with Mootools. If you don't want to disable mootools completely then you can use solution provided by @aptol1952 at viewtopic.php?f=715&t=989407&start=30#p3645983
It works but it may affect other sections as well. So you can try it and see if modals still works.
Thanks,
Zack
It works but it may affect other sections as well. So you can try it and see if modals still works.
Thanks,
Zack
sokrates_mx5 wrote: ↑Tue Nov 30, 2021 11:06 pmI've just realized that GTranslate doesn't respond any longer (Joomla 3.10.3). It has worked earlier, but I can't say how long time ago and with which upgrade of Joomla this problem appeared.
I disabled GTranslate and installed SEF Translate, which also use the Google Translate API. The result was the same.
I found this thread showing that the problem with GTranslate could be related to Mootools. Even at the support forum of Orda SoftMoostools is "blamed" for the problem and they advice to install and use Mootools Enabler/Disabler extension.
After the Mootools has been disabled, then GTranslate and SEF Translate begin to work again, but with mootools disabled then Modals extension of Regular Labs stopped to work The site depends on using Modals, so I had to enable Mootools again, since the translation function is not equal important but nice to have working.
The developer of the Mootools extension writes.
Mootools option Disables 4 js files - around 330 kB
media/system/js/caption.js
media/system/js/mootools-core.js
media/system/js/core.js
media/system/js/mootools-more.js
(https://www.extensionbase.com/joomla-di ... tools.html)
Any idea if one can make any of the two Google Translate extensions to work without disabling Mootools?
-
- Joomla! Fledgling
- Posts: 1
- Joined: Wed Dec 01, 2021 1:21 pm
Re: GTranslate plugin don't translate recently.
Hi,
a few days ago, I noticed that GTranslte plugin no longer worked properly and the only error was a console message that said something like "Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)".
I found that this problem was caused by Array.from javascript function rewrite by /media/system/js/mootools-core.js library:
I think the best solution is to disable MooTools javascript library, if possible. In my case other parts depend on it, so I solved the problem by changing the Array.from function as follows:
In my case the translation started working again. I hope this solution can be useful.
I'm using Joomla! 3.4.6 and GTranslate 3.7.6.
a few days ago, I noticed that GTranslte plugin no longer worked properly and the only error was a console message that said something like "Resource blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)".
I found that this problem was caused by Array.from javascript function rewrite by /media/system/js/mootools-core.js library:
Code: Select all
Array.from = function(a) {
return null == a ? [] : f.isEnumerable(a) && "string" != typeof a ? "array" == b(a) ? a : e.call(a) : [a]
}
Code: Select all
// Old code
// Array.from=function(a){return null==
// a?[]:f.isEnumerable(a)&&"string"!=typeof a?"array"==b(a)?a:e.call(a):[a]};
// New code
old_array_from = Array.from;
Array.from=function(a){
return null==a
?[]
:f.isEnumerable(a)&&"string"!=typeof a
?"array"==b(a)
?a
:e.call(a)
:("object" == b(a))
?old_array_from(a)
:[a];
};
I'm using Joomla! 3.4.6 and GTranslate 3.7.6.
-
- Joomla! Explorer
- Posts: 289
- Joined: Thu Jun 10, 2010 12:38 pm
- Contact:
Re: GTranslate plugin don't translate recently.
You're running an outdated version of Joomla that is six years old. Why not update to the newest and see if it still works?
-
- Joomla! Apprentice
- Posts: 7
- Joined: Thu Jul 14, 2011 7:50 am
-
- Joomla! Explorer
- Posts: 310
- Joined: Tue Mar 24, 2009 12:30 pm
Re: GTranslate plugin don't translate recently.
Thanks Zackmack, I prefer to keep the "hacks" of the source code to an absolute minimum, since it makes updates more complicated and there's always a risk one creates a mess elsewhere.zackmack wrote: ↑Wed Dec 01, 2021 8:08 amThis problem is with Google's translate APIs. We can't do anything with Google's API JS changes so have to do some hacks with Mootools. If you don't want to disable mootools completely then you can use solution provided by @aptol1952 at viewtopic.php?f=715&t=989407&start=30#p3645983
It works but it may affect other sections as well. So you can try it and see if modals still works.
I will have to wait and see if it could be possible to get the error in the API of Google Translate corrected.
Unfortunately, I don't have an answer to this questionweltonwms wrote: ↑Tue Nov 30, 2021 11:37 pmThe question now is: how do we talk to the team that worked on this script: https://translate.google.com/translate_a/element.js?
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sun Mar 05, 2017 3:51 pm
Re: GTranslate plugin don't translate recently.
Guys, reading the comments of colleagues, studying the error a little, I came to a solution. I'll put my analysis here:
aptol1952 says to remove " " .aptol1952 came close to the problem, but this solution leaves a syntax error.
zackmack is right, as we shouldn't wait for a fix from the Google API, as they did tweak the code recently, but this change is not an error. It's just a conflict with mootools.
I would like to thank fraig. His hack is perfect. fraig showed the exact point of conflict. I will try to explain what I think happened. Mootools changes the Array.from() function. This function is native to javascript array. mootools in version 1.4.5 does not take into account receiving an object in this function. Possibly before the Google API didn't use Array.from() passing an object and recently started to use it. I think it's hard for someone to do what Mootools did, which is to overwrite something native to Javascript, but the fraig hack is perfect precisely because of that. The hack leaves the mootools code as it is, but when it comes to object conditions, it uses the native Array.from(), javascript's native function.
sokrates_mx5 can trust the fraig hack, as it doesn't change almost anything, it just adds the correct use of Array.from() which is native to javascript.
aptol1952 says to remove "
Code: Select all
for a?[]:f.isEnumerable(a)&&"string"!=typeof a?"array"==b(a)?a:e.call(a):[a]}
zackmack is right, as we shouldn't wait for a fix from the Google API, as they did tweak the code recently, but this change is not an error. It's just a conflict with mootools.
I would like to thank fraig. His hack is perfect. fraig showed the exact point of conflict. I will try to explain what I think happened. Mootools changes the Array.from() function. This function is native to javascript array. mootools in version 1.4.5 does not take into account receiving an object in this function. Possibly before the Google API didn't use Array.from() passing an object and recently started to use it. I think it's hard for someone to do what Mootools did, which is to overwrite something native to Javascript, but the fraig hack is perfect precisely because of that. The hack leaves the mootools code as it is, but when it comes to object conditions, it uses the native Array.from(), javascript's native function.
sokrates_mx5 can trust the fraig hack, as it doesn't change almost anything, it just adds the correct use of Array.from() which is native to javascript.
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sun Mar 05, 2017 3:51 pm
Re: GTranslate plugin don't translate recently.
Complementing: Before the fraig hack, I didn't know the exact point of conflict, so what I did: Tested the latest versions of: mootools-core.js and mootools-more.js, versions 1.6.0, available on the website from mootools: https://mootools.net/core and https://mootools.net/more. Replacing the files in /media/system/js/ solves the conflict problem. In my case with my few extensions that use mootools I didn't see an error, looking in the browser console (f12).
However on your site there may be some extension that depends on something in the older version 1.4.5. That's why the fraig hack is the best solution, as it changes the minimum necessary. It doesn't cause that much change.
However on your site there may be some extension that depends on something in the older version 1.4.5. That's why the fraig hack is the best solution, as it changes the minimum necessary. It doesn't cause that much change.