Issue with main menu item and SEF urls
Moderator: General Support Moderators
Forum rules
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Issue with main menu item and SEF urls
Hi to all,
i am new to Joomla and trying to set a multilingual site (Greek as default and English languages) on my local host.
So, i have installed latest Joomla and Joom!Fish and followed the instructions. I also have enabled the SEF Urls from the admin configuration panel. I have also set no language detection and SEF prefix usage (disabled cookies to save language) from Jfrouter plugin.
I have the following issues though concerning the frontend:
1. When i click on the main menu item, i get redirected to the Greek language home page, even if i have previously selected the English language to be active. For example, if i am on page http://localhost/joomla/index.php/en/events and click on the main menu item, i get redirected to http://localhost/joomla/ page with the Greek translation, while i would like to get redirected to the English translation page.
2. If i login to the frontend when i am already on page http://localhost/joomla/index.php/en/events, after successful login, i get redirected to page http://localhost/joomla/index.php/events?lang=en, while i would like to get redirected to the same url (using SEF urls parameter).
Any ideas?
thanks in advance,
Dimitris
i am new to Joomla and trying to set a multilingual site (Greek as default and English languages) on my local host.
So, i have installed latest Joomla and Joom!Fish and followed the instructions. I also have enabled the SEF Urls from the admin configuration panel. I have also set no language detection and SEF prefix usage (disabled cookies to save language) from Jfrouter plugin.
I have the following issues though concerning the frontend:
1. When i click on the main menu item, i get redirected to the Greek language home page, even if i have previously selected the English language to be active. For example, if i am on page http://localhost/joomla/index.php/en/events and click on the main menu item, i get redirected to http://localhost/joomla/ page with the Greek translation, while i would like to get redirected to the English translation page.
2. If i login to the frontend when i am already on page http://localhost/joomla/index.php/en/events, after successful login, i get redirected to page http://localhost/joomla/index.php/events?lang=en, while i would like to get redirected to the same url (using SEF urls parameter).
Any ideas?
thanks in advance,
Dimitris
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
Have you renamed and edited the htaccess.txt ?
Do you have an SEF Component and not Purged the SEF url's ?
Do you have an SEF Component and not Purged the SEF url's ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
As i've mentioned, i am new to Joomla and linux-based technologies. Could you provide some more guidance concerning the htaccess.txt file? Also, concerning the urls, i have just enabled the search engine friendly urls from the admin panel (joomla v 1.5.21). No extension module / plugin used.
thanks
thanks
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
I have both .htaccess and htaccess.txt on my joomla directory. Should i rename the htaccess.txt to .htaccess and replace the old one?
Also, i host my site on a shared hosting services provider. Should i check something on the server configuration?
Also, i host my site on a shared hosting services provider. Should i check something on the server configuration?
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
The .htaccess is probable created by your Host. What's in it ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
# To set your custom php.ini, add the following line to this file:
# suphp_configpath /home/yourusername/path/to/php.ini
Should i replace it?
# suphp_configpath /home/yourusername/path/to/php.ini
Should i replace it?
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
Add the contents to the htaccess.txt (the contents is commented out but you may need it at a future date. You may not but to be safe keep the contents).
Delete the .htaccess file
Follow the instructions on the link I posted
ie. rename the htaccess.txt then edit it as required.
Delete the .htaccess file
Follow the instructions on the link I posted
ie. rename the htaccess.txt then edit it as required.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
I have followed your instructions.
Renamed htaccess.txt to .htaccess but i get not found errors for my urls (http://localhost/joomla/en.html for the home page).
I tried to enable mod_rewrite on my local host installation, but the httpd.conf file inside /etc/apache2/ folder is empty.
Renamed htaccess.txt to .htaccess but i get not found errors for my urls (http://localhost/joomla/en.html for the home page).
I tried to enable mod_rewrite on my local host installation, but the httpd.conf file inside /etc/apache2/ folder is empty.
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
Please attach your .htaccess file
Do you have an SEF Component that you forgot to Purge.
Do you have an SEF Component that you forgot to Purge.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
Some strange things happen on my local host joomla installation. The .htaccess file under var/www/joomla/ folder is no more visible! When i copy the htaccess.txt and try again to rename it to .htaccess, a message is displayed informing that the .htaccess already exists and that it is used from another process. I send over the htaccess.txt file that i have kept as a backup file.
The strange is that i tried the same thing on another joomla installation on my shared hosting provider and it worked (i am not using Joom!Fish on this one).
thanks for the help!
The strange is that i tried the same thing on another joomla installation on my shared hosting provider and it worked (i am not using Joom!Fish on this one).
thanks for the help!
You do not have the required permissions to view the files attached to this post.
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
Sometimes it is necessary to 'force' hidden files to show.
I have addedto your htaccess.txt in case you need that code later.
Have uncommented RewriteBase / like the instructions told you to do. (You will need to append a subdirectory if your Joomla is not in the root).
I have added
Code: Select all
# To set your custom php.ini, add the following line to this file:
# suphp_configpath /home/yourusername/path/to/php.ini
Have uncommented RewriteBase / like the instructions told you to do. (You will need to append a subdirectory if your Joomla is not in the root).
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
I used your file with no success.
The joomla installation is located under var/www/Joomla, so i guess it is in the root and as a result i shouldn't add anything on the RewriteBase /. I have also tried commenting out the Options +FollowSymLinks, without success.
What i have noticed is that SEF Urls work as expected. The only thing that doesn't work is the mod_rewrite option. I also tried on another clean Joomla installation and i got the same results.
Don't you think it has something to do with my local Apache configuration?
The joomla installation is located under var/www/Joomla, so i guess it is in the root and as a result i shouldn't add anything on the RewriteBase /. I have also tried commenting out the Options +FollowSymLinks, without success.
What i have noticed is that SEF Urls work as expected. The only thing that doesn't work is the mod_rewrite option. I also tried on another clean Joomla installation and i got the same results.
Don't you think it has something to do with my local Apache configuration?
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
www is your root
and
www/joomla is a subdirectory
so
RewriteBase /
needs to be
RewriteBase /joomla
I think the problem is your lack of knowledge of paths and directories.
http://www.webdiner.com/webadv/begin/paths.htm may help lessen your confusion.
And reread the page from the other link I gave earlier on.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
OK, sorry for the confusion.
I am not that rookie. I just thought that RewriteBase considered as root the joomla installation, since it is located inside the joomla installation.
Actually, this was not the only problem. I had to enable mod_rewrite on apache (using a2enmod rewrite) and also to modify the AllowOverRide parameter to All in the /etc/apache/sites-available/default file.
Here is the link i followed: http://ubuntuforums.org/showthread.php?t=255556&page=2
So, after all this effort (again sorry the confusion), i finally managed to get SEF Urls work with mod_rewrite, but i stil have the issues mentioned on my first post that have to do with the combination of Joom!Fish and SEF Urls.
Whenever i select the English language and click on the Home menu item, i get redirected to the Greek home page (Greek is the default language). Also, when i am on an English page and try to logout, i get redirected to the Greek home page and moreover, the user does not log out.
thanks, i really appreciate your help
I am not that rookie. I just thought that RewriteBase considered as root the joomla installation, since it is located inside the joomla installation.
Actually, this was not the only problem. I had to enable mod_rewrite on apache (using a2enmod rewrite) and also to modify the AllowOverRide parameter to All in the /etc/apache/sites-available/default file.
Here is the link i followed: http://ubuntuforums.org/showthread.php?t=255556&page=2
So, after all this effort (again sorry the confusion), i finally managed to get SEF Urls work with mod_rewrite, but i stil have the issues mentioned on my first post that have to do with the combination of Joom!Fish and SEF Urls.
Whenever i select the English language and click on the Home menu item, i get redirected to the Greek home page (Greek is the default language). Also, when i am on an English page and try to logout, i get redirected to the Greek home page and moreover, the user does not log out.
thanks, i really appreciate your help
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
RewriteBase is the base of the server
Ok will ask again
Do you have an SEF Component that you forgot to Purge ?
If you don't have an SEF component then perhaps try JoomSEF ?
Also check your plugins and see if any are disabled that could be causing it ?
Have also noticed /index.php is in your url's wonder if that is causing it ?
What is your default menu item pointing at ?
Ok will ask again
Do you have an SEF Component that you forgot to Purge ?
If you don't have an SEF component then perhaps try JoomSEF ?
Also check your plugins and see if any are disabled that could be causing it ?
Have also noticed /index.php is in your url's wonder if that is causing it ?
What is your default menu item pointing at ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
So, here is the status till now.
I have enabled both SEF Urls and apache mode_rewrite (not the add suffix) options, the home page (pointed also from the main menu item) url is http://localhost/joomla and i get redirected to http://localhost/joomla/el or http://localhost/joomla/en if i click on the language flags.
From the plugin manager i have enabled System-Jfooter plugin, where i have set language determination, 302 redirect and save language in a cookie to no and use SEF prefixes.
Also, the System-SEF plugin is enabled. Do you think i should use JoomSEF?
Also, index.php is not in the url anymore, since i have enabled Apache mod_rewrite.
Also, i' ve noticed that 302 redirect causes some different scenarios. If enabled, the home page gets redirected always to http://localhost/joomla/el (if i click on the login-logout button or the main menu item) and i cannot login - logout. If not enabled, then the home page is http://localhost/joomla/ (not redirected to http://localhost/joomla/el) and when i am on some page like http://localhost/joomla/el/events and for example login-logout successfully, then i get redirected to http://localhost/joomla/events?lang=el (the SEF Url does not work)!
I have enabled both SEF Urls and apache mode_rewrite (not the add suffix) options, the home page (pointed also from the main menu item) url is http://localhost/joomla and i get redirected to http://localhost/joomla/el or http://localhost/joomla/en if i click on the language flags.
From the plugin manager i have enabled System-Jfooter plugin, where i have set language determination, 302 redirect and save language in a cookie to no and use SEF prefixes.
Also, the System-SEF plugin is enabled. Do you think i should use JoomSEF?
Also, index.php is not in the url anymore, since i have enabled Apache mod_rewrite.
Also, i' ve noticed that 302 redirect causes some different scenarios. If enabled, the home page gets redirected always to http://localhost/joomla/el (if i click on the login-logout button or the main menu item) and i cannot login - logout. If not enabled, then the home page is http://localhost/joomla/ (not redirected to http://localhost/joomla/el) and when i am on some page like http://localhost/joomla/el/events and for example login-logout successfully, then i get redirected to http://localhost/joomla/events?lang=el (the SEF Url does not work)!
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
Try
var $live_site = '';
to
var $live_site = 'www.yoursite.com/joomla';
Are you using Joomfish if so then http://www.joomfish.net/en/documentation/tutorials search the page for SEF. There is a video tutorial
Try JoomSEF and, when installed, go to it's extensions plugins.
var $live_site = '';
to
var $live_site = 'www.yoursite.com/joomla';
Are you using Joomfish if so then http://www.joomfish.net/en/documentation/tutorials search the page for SEF. There is a video tutorial
Try JoomSEF and, when installed, go to it's extensions plugins.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
I don't see why i should use JoomSEF. I really would like to stick with core functionality.
After additional research, i found that the error is located inside Joomla core helper.php files for both mod_mainmenu and mod_login.
Inside mod_mainmenu, line 351 the code:
$tmp->url = JURI::base();
should change to something that takes into account the language selected and not redirect always to http://localhost/joomla when i click on the home menu item, but to http://localhost/joomla/el or http://localhost/joomla/en according to the language selected.
Also, in mod_login, line 32 the code:
$uri = JFactory::getURI();
the return URL should take into account the SEF Url activation and redirect to the exact same page (for example http://localhost/joomla/el/articles and not http://localhost/joomla/articles?lang=el when logging in or out).
Really, am i the only one trying to combine SEF urls along with JoomFish multilingual support facing this kind of issues?
After additional research, i found that the error is located inside Joomla core helper.php files for both mod_mainmenu and mod_login.
Inside mod_mainmenu, line 351 the code:
$tmp->url = JURI::base();
should change to something that takes into account the language selected and not redirect always to http://localhost/joomla when i click on the home menu item, but to http://localhost/joomla/el or http://localhost/joomla/en according to the language selected.
Also, in mod_login, line 32 the code:
$uri = JFactory::getURI();
the return URL should take into account the SEF Url activation and redirect to the exact same page (for example http://localhost/joomla/el/articles and not http://localhost/joomla/articles?lang=el when logging in or out).
Really, am i the only one trying to combine SEF urls along with JoomFish multilingual support facing this kind of issues?
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
Because the fault is with Joomfish not Joomla and JoomSEF may handle the bad Joomfish SEF integration ?dkarantonis wrote:I don't see why i should use JoomSEF. I really would like to stick with core functionality.
.......
Really, am i the only one trying to combine SEF urls along with JoomFish multilingual support facing this kind of issues?
There are many unanswered posts on the Joomfish Support forum with a similar problem.
http://extensions.joomla.org/extensions ... ackup/1606
Even as far back as 2008 they have had this problem http://www.joomfish.net/forum/viewtopic ... sef#p28444
It appears you have a few choices
Ditch Joomfish
Install a third part SEF component that might handle it
Post a post on their Forum and wait 2 years and still not get an answer.
Sorry but that is all I can suggest unless you try Google to see if there are other options ?
Hope you manage to sort it out soon.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
So, you don't suggest modifying Joomla core files, rather try to use some other SEF tool like JoomSEF.
Ok, i' ll try again and see what will happen.
thanks a lot for coming all the way to help me out!
Ok, i' ll try again and see what will happen.
thanks a lot for coming all the way to help me out!
- Webdongle
- Joomla! Master
- Posts: 44020
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Issue with main menu item and SEF urls
No, I don't recommend altering Joomla core files because when there is an update the modification can get overwritten. If you must re-invent the wheel because you have installed an extension that, for whatever reason, is not accessing the SEF correctly then Template overrides is preferable http://docs.joomla.org/Understanding_Output_Overrides
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
No argue with this.
I' ll check for Template overrides.
thanks
I' ll check for Template overrides.
thanks
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
Hi again,
i' ve just found something that needs to be mentioned.
I have found and used a language aware menu module here: http://joomlacode.org/gf/project/joomfi ... ase_id=838, that solves the issues with changing the language when clicking on the home menu item. The only thing is that the legacy plugin is required.
So, the only issue is that remains is the sef not working properly when logging in and out grom the front end Login module.
thanks
i' ve just found something that needs to be mentioned.
I have found and used a language aware menu module here: http://joomlacode.org/gf/project/joomfi ... ase_id=838, that solves the issues with changing the language when clicking on the home menu item. The only thing is that the legacy plugin is required.
So, the only issue is that remains is the sef not working properly when logging in and out grom the front end Login module.
thanks
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
Many other modules are also language aware. Only the core menu module isn't!
-
- Joomla! Apprentice
- Posts: 22
- Joined: Mon Nov 15, 2010 10:05 pm
- Location: Greece
- Contact:
Re: Issue with main menu item and SEF urls
All login modules i tried have issues with taking into account language parameter when using sef. After each successful login-logout, they redirect visitor to the page with the language as a url query parameter instead of part of the url.
Is there any language-sef aware login module that works?
thanks
Is there any language-sef aware login module that works?
thanks