On Fly (jQuery) and Redirect Not Working ( Pro )
Mar 31, 2011 1:47 pm by smanager3
Mar 31, 2011 1:47 pm by smanager3
Hello there hope someone can advise me on a solution to my problem.
I have installed pro version as per the readme file, however i can only get the google default translate to work. When I select either On Fly or Redirect the flags in the module do nothing.
I have used the API from Google and entered my username and password.
I have also requested a new API and replaced and removed the old one.
The only thing i am unsure of is if my .htaccess file is correct... please advise.
##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##
#####################################################
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################
## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
#
# mod_rewrite in use
RewriteEngine On
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)
# RewriteBase /
########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Mar 31, 2011 5:08 pm by Edvard
Mar 31, 2011 5:08 pm by Edvard
Move # gtranslate config block after RewriteEngine On line and use Redirect translation method with Pro option on.
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 1, 2011 8:58 am by smanager3
Apr 1, 2011 8:58 am by smanager3
Hi thank you for a quick reply...
I think i have moved the # gtranslate block to the correct place... now reads.
RewriteEngine On
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)
# RewriteBase /
########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
I have the pro option active in the module as well as the redirect. but still no joy with either redirect or On Fly.
Could there be a problem with the file permissions? Can you please advise what they should be.
I have already set the cache to 777 as instructed.
The other files are all 644 is this correct?
thanks again
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 1, 2011 3:35 pm by smanager3
Apr 1, 2011 3:35 pm by smanager3
Someone please help this is what I have done, checked and double checked...
PHP ionCube Loader - installed
PHP Curl library - installed
PHP JSON library - installed
gtranslate folder uploaded with transfer type set to BINARY
gtanslate/cache folder permission set to 777
-------
.htaccess file reads as follows
# mod_rewrite in use
RewriteEngine On
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)
# RewriteBase /
########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
------
Config file edits done
Google API key is in config
Google username is in config
Google pasword is in config
------
In robots.txt file
Sitemap: http://www.mydomainname/sitemap.txt
-----------------
root folder sitemap.txt created and http://mydomainname/lag/ list pasted in to file.
----------------
Gtranslate free version installed and pro version active.
---------------
Can someone please tell me where im going wrong... or what i have missed.
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 4, 2011 12:11 pm by Edvard
Apr 4, 2011 12:11 pm by Edvard
I'm not sure that your .htaccess rewrite rules work. Can you upload info.php file from the product package into gtarnslate folder and let me know? When I go to yourdomain.com/ru for Russian it shows me 404 not found error.
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 5, 2011 8:34 am by smanager3
Apr 5, 2011 8:34 am by smanager3
Hi and thank you for your reply.... was begining to worry...
I have uploaded the info.php file as you requested.
thanks...
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 5, 2011 8:44 am by smanager3
Apr 5, 2011 8:44 am by smanager3
Ah ha... Think i have found the problem!!!!!
I had Gogogle Analytics turned on for " On Fly " when i turned it off the translate worked. However when i use " Redirect " the flags now work but send me to the 404 pages. I have tried this with JQuery " On and Off ".
But atleast we are getting somewhere.
Oh and one other thing it wont translate Community buider pages. I have created a copy of the translate module, turned jquery off as CB has its own its own Jquery in the HEAD ( I believe ), but still no translation any ideas?
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 5, 2011 6:56 pm by Edvard
Apr 5, 2011 6:56 pm by Edvard
Can you create a blank debug.txt file inside gtranslate folder and set permission to 666?
It doesn't seem that cache/XX folders are writable.
Where your .htaccess file is located? Make sure the name is .htaccess not htaccess or htaccess.txt.
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 6, 2011 8:49 am by smanager3
Apr 6, 2011 8:49 am by smanager3
Hello again...
debug.txt file created with permissions as requested.
.htaccess file is named as requested.
cache folder and subfolders are rwx-rwx-rwx. The limit.txt folder is rw-r-r
thanks
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 6, 2011 10:15 am by smanager3
Apr 6, 2011 10:15 am by smanager3
My .htaccess file was wrongly named, but is now, and the 404 error has gone.
The url now changes to www.domain.com/xx/ but still no translation.
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 6, 2011 10:20 am by Edvard
Apr 6, 2011 10:20 am by Edvard
Good, you have an extra space in the end of your API key in gtranslate/config.php file, you need to remove it.
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 6, 2011 10:40 am by smanager3
Apr 6, 2011 10:40 am by smanager3
Your A STAR!!!!
Redirect is working, Hurray!!!.
Time to blow my head off now for not checking the htaccess file name was correct ( I was so sure it was, because i changed it to .htaccess to use the url re-write when i first installed Joomla ).
Then again aposed to blowing me head off im to get started and create the cached pages.
Oh do you have any ideas about Community Buider?
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 6, 2011 10:42 am by Edvard
Apr 6, 2011 10:42 am by Edvard
Good! What are you asking about CB?
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 6, 2011 11:44 am by smanager3
Apr 6, 2011 11:44 am by smanager3
I dont think its a gtranslate problem, I think its url writing inconsistancies in CB but could be wrong. for example.
In a CB user list there are currently two links pointing to the users profile page, one from the logo image and the other from the username. The link from the image will transate but the link from the username does not.
Username url does not translate.
not: http://www.domain.com/index.php/en/View ... ml?user=63
User logo ure does.
http://www.domain.com/zh-TW/index.php/e ... ml?user=63
Obviously the /zh-TW/ is the part that is missing.
Any other ideas? Oh and i am using Sh04sef.
Re: On Fly (jQuery) and Redirect Not Working ( Pro )
Apr 6, 2011 12:20 pm by Edvard
Apr 6, 2011 12:20 pm by Edvard
If it is not a regular link <a href="..."></a> in the code, then it will not add the language code. May be it is generated with javascript? You need to check the source code to find the difference between the link which work and which doesn't.
SIMILAR TOPICS
Drop down is not working??? | Sep 30, 2018 11:05 am | Replies: 1 | Post by: vijayparmar |
Cart stopped working | Sep 1, 2018 12:10 pm | Replies: 3 | Post by: willsonjayram |
Plugin Not Working | Mar 10, 2018 6:49 pm | Replies: 11 | Post by: wsjiii |
Enterprise URLs not working | May 14, 2018 8:25 pm | Replies: 1 | Post by: dpitfield |
Translation link not working after module upgrade | Nov 28, 2017 11:45 pm | Replies: 1 | Post by: andru |