Post by dimitrisk » Fri Oct 25, 2013 10:50 pm

Hi to all,
i'd like to ask if anyone has any idea what is causing the problem i'm dealing with language switch.
Lnguage switch works just fine on inner pages but when it comes to homepage i get the message "page dont found".
I am using 2 languages english and greek(the default) and i have also install seo pack pro module.

Most strange is that everething worked ok until i moved the site from a subfolder to public html.
I also tested the site n local host and works fine.

I already checked (again and again and again..) htaccess file and i am almost sure that this issue has nothing to do with it.

Any ideas?

thanks

Newbie

Posts

Joined
Fri Oct 25, 2013 10:27 pm

Post by butte » Sat Oct 26, 2013 12:31 am

Try flushing your /vqmod/mods.cache, /vqmod/cache/, and /system/cache/ files. If you have not done that, then it is remembering where it was and something about languages is caught in the turnstile, dizzied beyond repair. (Where index.php?route knows where it is going relative to /, some of what ties into it may not, and if the cache files are telling it /dirname/ while it is busily doing /, then something is likely to go haywire, the language goes haywire at OC home, at / rather than at /dirname/, until the cache files are all trotted of to gallows or guillotine or marched off the gangplank.)

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by dimitrisk » Sat Oct 26, 2013 7:14 pm

Thanks for the reply

I deleted all the cache files but stil no luck..
When i disable seo url and delete htaccess, language switch works on home page.
But with seo url enable i get "page not found".

I still cannot understand how everything works ok in local host and not on server

Newbie

Posts

Joined
Fri Oct 25, 2013 10:27 pm

Post by butte » Sat Oct 26, 2013 9:18 pm

Evidently, then, enabling and disabling .htaccess has no effect, enabling and disabling SSL causes the switch to work and not to work, so what differences are there as to SSL itself between local and public machines? You probably don't, but DO you have SSL on your local machine? If not, then you can self-generate a certificate and install it locally (read up on local self generated certificate, https://www.google.com/search?q=local+s ... =firefox-a , and do not expect to use that on your hosted domains). If both machines then decline to cooperate, you may find the difference in config,php, possibly as simple as one "s" (in https://) out of place.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by dimitrisk » Tue Oct 29, 2013 4:41 pm

I discovered that when i disable the featured products module, language switch works ok.
Any ideas what is causing the conflict between those two ?

Newbie

Posts

Joined
Fri Oct 25, 2013 10:27 pm

Post by butte » Wed Oct 30, 2013 1:20 am

Be sure to put .htaccess back into play, if you didn't already.

Just looking above, we seem to have neglected the usual suspects. Version, theme, extensions? It would be well to know those first (you do, we don't). If not default theme, then theme author should be asked about it.

It seems to be down to SSL switching, language switching, and featured products. The usual config.php sections should take care of featured products, which in turn really should not be governing the language switch. It may be that you need to ADD to the HTTPS sections in the two config.php a line for LANGUAGE (your own de novo line, just follow the pattern as to https:// and the trailing /). Dunno, might work.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by dimitrisk » Wed Oct 30, 2013 9:01 pm

Again, thanks for the reply

Problem finally solved

It was a conflict between jquery scripts
I deleted the jquery 1.8 link from featured.tpl and now everything seems to work right

Newbie

Posts

Joined
Fri Oct 25, 2013 10:27 pm

Post by butte » Fri Nov 01, 2013 1:21 pm

Cool. If it stays fixed, then go ahead and edit your opening title Solved.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by dimitrisk » Sat Nov 02, 2013 12:46 am

Unfortunately it didn't stay fixed.

Now the error (page not found when click on language switch) exist not only on homepage but on all pages (firefox & explorer).
The strange is that the site run error free in chrome..

Newbie

Posts

Joined
Fri Oct 25, 2013 10:27 pm

Post by butte » Sun Nov 03, 2013 12:42 am

Well, that's not good, more of the world is using FF and IE, combined, than C, and if both FF and IE are seeing nothing, then you can expect problems with O and S, too. Revert in .tpl and try the other way (above).

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by dimitrisk » Mon Nov 04, 2013 7:18 pm

Version is 1.5.5.1 and the theme is the default one.

I can't find any solution
I disabled SEO url and renamed htaccess so i can have both language available..

What makes you think that ssl has a relationship with this error on language switch?

Newbie

Posts

Joined
Fri Oct 25, 2013 10:27 pm

Post by butte » Tue Nov 05, 2013 2:37 am

Early on the description seemed to mean, "enabling and disabling SSL causes the switch to work and not to work," and since the problem seems to occur in the public root, but not in a directory above there or on the local machine, attention tends to go to (a) a little "s" wrong in HTTP and HTTPS in config.php; to (b) basedir / or /directoryname/ in .htaccess; to (c) misspelling of anything among HTTP, HTTPS, and DIR addresses or disc paths; or to (d) a hard-coded address in language assuming too much of basedir. There are other possibilities, but those readily allow a simple booboo.

You want to have .htaccess active, at least down through and including no indexing and no listed file types.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by dimitrisk » Tue Nov 05, 2013 5:27 pm

This is my htaccess file:

Code: Select all

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled. 



# 2. In your opencart directory rename htaccess.txt to .htaccess.



# For any support issues please visit: http://www.opencart.com



Options +FollowSymlinks



# Prevent Directoy listing 

Options -Indexes



# Prevent Direct Access to files

<FilesMatch "\.(tpl|ini|log)">

 Order deny,allow

 Deny from all

</FilesMatch>



# SEO URL Settings

RewriteEngine On

# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ 



RewriteBase /

RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]

RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)

RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]



### Additional Settings that may need to be enabled for some servers 

### Uncomment the commands by removing the # sign in front of it.

### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.



# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:

# php_flag register_globals off



# 2. If your cart has magic quotes enabled, This may work to disable it:

# php_flag magic_quotes_gpc Off



# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try

# php_value upload_max_filesize 999M



# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields

# php_value post_max_size 999M



# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields

# php_value max_execution_time 200



# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields

# php_value max_input_time 200



# 7. disable open_basedir limitations

# php_admin_value open_basedir none
This is my config.php

Code: Select all

<?php
// HTTP
define('HTTP_SERVER', 'http://example.gr/');

// HTTPS
define('HTTPS_SERVER', 'http://example.gr/');

// DIR
define('DIR_APPLICATION', '/home/example/public_html/catalog/');
define('DIR_SYSTEM', '/home/example/public_html/system/');
define('DIR_DATABASE', '/home/example/public_html/system/database/');
define('DIR_LANGUAGE', '/home/example/public_html/catalog/language/');
define('DIR_TEMPLATE', '/home/example/public_html/catalog/view/theme/');
define('DIR_CONFIG', '/home/example/public_html/system/config/');
define('DIR_IMAGE', '/home/example/public_html/image/');
define('DIR_CACHE', '/home/example/public_html/system/cache/');
define('DIR_DOWNLOAD', '/home/example/public_html/download/');
define('DIR_LOGS', '/home/example/public_html/system/logs/');

// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'username');
define('DB_PASSWORD', 'password');
define('DB_DATABASE', 'database');
define('DB_PREFIX', 'oc_');
?>

Newbie

Posts

Joined
Fri Oct 25, 2013 10:27 pm

Post by butte » Tue Nov 05, 2013 11:24 pm

The .htaccess does say "RewriteBase /". It's almost as though there is a lurking vestige of "RewriteBase /dirname/" somewhere. Three approaches to try, make backups first.

(1) An idiosyncrasy of 1.5.6.0 might be causing it. These are grossly inadequate in prior versions:

// HTTP
define('HTTP_SERVER', 'http://example.gr/');
// HTTPS
define('HTTPS_SERVER', 'http://example.gr/');

(a) try
define('HTTPS_SERVER', 'https://example.gr/');

(b) You might try using SETS of those lines matching a prior version's layout.

(2) Down at the bottom, No. 7, just for sheer kicks you might try uncommenting the very last line
# php_admin_value open_basedir none
to
php_admin_value open_basedir none
BUT EXPECT that you MIGHT need to change that right back, again. (Just be at the ready with ftp to put the normal one back in place.)

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by jonyguitar » Fri Jan 01, 2016 11:39 pm

Hi, did you solve the problem? i have the same problem and do not know how to fix it.

Newbie

Posts

Joined
Sat Jun 27, 2015 4:53 am

Post by gerstavros » Sat Feb 25, 2017 1:32 am

me too!

New member

Posts

Joined
Mon Apr 04, 2016 12:44 am
Who is online

Users browsing this forum: No registered users and 59 guests