On Fly (jQuery) and Redirect Not Working ( Pro )

Popular automatic website translation tool

On Fly (jQuery) and Redirect Not Working ( Pro )

Postby smanager3 » Thu Mar 31, 2011 5:47 pm

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
smanager3
 
Posts: 9
Joined: Thu Mar 31, 2011 5:36 pm

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby Edvard » Thu Mar 31, 2011 9:08 pm

Move # gtranslate config block after RewriteEngine On line and use Redirect translation method with Pro option on.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby smanager3 » Fri Apr 01, 2011 12:58 pm

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
smanager3
 
Posts: 9
Joined: Thu Mar 31, 2011 5:36 pm

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby smanager3 » Fri Apr 01, 2011 7:35 pm

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.
smanager3
 
Posts: 9
Joined: Thu Mar 31, 2011 5:36 pm

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby Edvard » Mon Apr 04, 2011 4:11 pm

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.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby smanager3 » Tue Apr 05, 2011 12:34 pm

Hi and thank you for your reply.... was begining to worry...

I have uploaded the info.php file as you requested.

thanks...
smanager3
 
Posts: 9
Joined: Thu Mar 31, 2011 5:36 pm

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby smanager3 » Tue Apr 05, 2011 12:44 pm

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?
smanager3
 
Posts: 9
Joined: Thu Mar 31, 2011 5:36 pm

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby Edvard » Tue Apr 05, 2011 10:56 pm

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.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby smanager3 » Wed Apr 06, 2011 12:49 pm

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
smanager3
 
Posts: 9
Joined: Thu Mar 31, 2011 5:36 pm

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby smanager3 » Wed Apr 06, 2011 2:15 pm

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.
smanager3
 
Posts: 9
Joined: Thu Mar 31, 2011 5:36 pm

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby Edvard » Wed Apr 06, 2011 2:20 pm

Good, you have an extra space in the end of your API key in gtranslate/config.php file, you need to remove it.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby smanager3 » Wed Apr 06, 2011 2:40 pm

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?
smanager3
 
Posts: 9
Joined: Thu Mar 31, 2011 5:36 pm

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby Edvard » Wed Apr 06, 2011 2:42 pm

Good! What are you asking about CB?
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby smanager3 » Wed Apr 06, 2011 3:44 pm

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.
smanager3
 
Posts: 9
Joined: Thu Mar 31, 2011 5:36 pm

Re: On Fly (jQuery) and Redirect Not Working ( Pro )

Postby Edvard » Wed Apr 06, 2011 4:20 pm

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.
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

2GLux