Sometimes the "Translate This" button is missing with only the word "Translate" displaying (see attachment image). Clicking on the word "Translate" is a link to http://translateth.is/. I haven't been able to determine why the translate_this button is missing sometimes and at other times it displays properly.
Any ideas?

Comments

aanjaneyam’s picture

I also have this problem but only with anonymous users. The button displays properly with authenticated users. I tried looking at the page source and found that the external javascript file is not loading for anonymous users. Any solutions?

aanjaneyam’s picture

Bump

MMachnik’s picture

StatusFileSize
new371 bytes

A simple solution is to disable caching for this block. I found that if I left the page cache on but disabled block caching, the problem went away. The attached patch adds just one line to translate_this_block_info() to tell it not to cache the block. With this change I was able to turn block caching back on -- this block just won't be cached.

It's not the permanent answer (still looking into that) but it works for now and allows us to cache the rest of the blocks on the site.

TJM’s picture

Thanks MMachnik,
Your patch worked for me. After adding your line of code, I flushed the cache and then the Translate-This button displayed properly.
Thanks
TJM

skoehn180’s picture

StatusFileSize
new6.5 KB
new3.7 KB

I tried this as well but did not have success. On some pages it displays fine, on others there's no image, but if I hover over the spot the menu displays. (I did clear my cache, too.)

sterndata’s picture

The patch worked for me, too. I had the same problem with anonymous users.

3olution’s picture

I think this module is abandoned?
No new commit since over a year.

BarisW’s picture

Status: Active » Fixed

Apologies for the delay. Some other modules asked for most of my time. Patch applied in dev. Will check the issue queue and then release a new version. Thanks for the patch MMachnik. Applied with proper attribution so it ends up on your profile.

By the way: to get patched applied sooner, please set the state to RTBC after testing ;)

sterndata’s picture

Status: Fixed » Needs work

The problem is occurring for me on another site, even with the patch applied and all caching disabled. I wind up with a "translate" link instead of the button that points to http://translateth.is/

I've looked at the source as a logged-in user and an anonymous user and it looks the same to me. I tried disabling external links but that didn't help. I'm excluding "translateth\.is"

Feel free to take a look at the dev site, http://prussing.sterndata.com

After a bit more testing, it seems that only the administrator can see the button. A regular user account gets the translate link.

BarisW’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Category: Support request » Bug report
Issue summary: View changes
Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.