VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: ereallstaff on May 30, 2012, 12:10:55 PM

Title: [SOLVED] SEO SEF routing with multiple languages goes to 404 errors
Post by: ereallstaff on May 30, 2012, 12:10:55 PM
my website is www.modacalcio.it and you can see by your self

I have set all main menu ( on top ) as normal joomla 2.5 menu voices listed as a single category

in #__menu table it sets alias and path . Path is set wrongly. Let's do an example:

~~~~~~~~~New menu voice. ~~~~~~~~~~~~
Name -- League
Language -- English
Alias -- search-football-shirt-by-league
Level -- Main
Link -- index.php?option=com_virtuemart&view=categories&virtuemart_category_id=314

~~~~~~ On Database ~~~~~~~~~~~~~~~
path --- campionato/serie-a/search-football-shirt-by-league/suche-produkt-nach-liga/serie-a/Ligue/serie-a   ---> ?? mixed language with a sub category wrongly in - It uses all other alias of same category in other languages
All the rest remains the same

~~~~~~~~~New menu SUB voice. ~~~~~~~~~~~~
Name -- English League
Language -- English
Alias -- search-football-shirt-by-premier-league-english-league
Level -- Under League ( previously created voice ) 
Link --  index.php?option=com_virtuemart&view=category&virtuemart_category_id=306

~~~~~~ On Database ~~~~~~~~~~~~~~~
path --- serie-a/Ligue/serie-a/suche-produkt-nach-liga/search-football-shirt-by-league/serie-a/campionato/search-football-shirt-by-premier-league-english-league/sconti-maglie-calcio-liga-spagnola/suche-fussball-trikot-rabatt-nach-spanien-liga-team/spanish-Ligue-football-maillots-rabais  ---> ?? Again mixed language with a sub with parent alias in all languages and also child alias in all languages . Also other category alias is used!

All the rest remains the same


Obviously the router returns a 404 error clicking in


I tried:

Manually modify the database of the child category, to match the alias with the one I put in

but it retrieves always the same virtuemart category :

// file -- /home/giuseppe/homeProj/ModaFinala/components/com_virtuemart/router.php   -- line 374
$helper->compareKey($view,'orders') || $helper->activeMenu->view == 'orders'   ( // retrieves always the category 295! )

BUG or mine configuration problems?

Thanks


Title: Re: SEO SEF routing with multiple languages goes to 404 errors or to wrong category
Post by: jjk on May 30, 2012, 13:41:03 PM
Quote from: ereallstaff on May 30, 2012, 12:10:55 PM
BUG or mine configuration problems?

Looks more like a multilingual configuration problem, not a VM2 bug (My bilingual J2.5.4/VM2 2.0.x works nicely)
Maybe also a problem with your GA Template not doing the multilingual menu correctly.

For a start, you can check your settings against this:
http://forum.virtuemart.net/index.php?topic=101280.msg335740#msg335740 (http://forum.virtuemart.net/index.php?topic=101280.msg335740#msg335740)
Note that it is required to have a separate Joomla menu (both, for Joomla content and shop content) for each language and a menu item for each Virtuemart category in all of your languages.
So if you have 5 shop categories in your italian ("it" language tag to be set in the Joomla menu configuration) menu, you need the same 5 shop categories in your english ("en" language tag) menu.
Title: Re: SEO SEF routing with multiple languages goes to 404 errors or to wrong category
Post by: ereallstaff on May 30, 2012, 15:47:49 PM
Hello and thanks for your reply

I have already one menu item for each menu category . I don't know about GK problem, as the path inside category and the route isn't done by normal virtuemart classes?

I will try follow the guide written also if at first look I have done same things here and also to contact gavick
Title: Re: SEO SEF routing with multiple languages goes to 404 errors or to wrong category
Post by: ereallstaff on June 05, 2012, 16:15:32 PM
Another update

manually modifying the field path  of #__menu table putting only the language involved it works , not alwatys but for most categories

in my opinion remains a bug when going to save a new menu item in joomla / administrator that may incurr with multiple languages together with a virtuemart category ( both if I chooose " single category " or " categories list " that frankly I cannot distinguish the behaviour . In this case it generates a wrong long multiple lang path that brings the error

Thanks to everybody
Title: Re: SEO SEF routing with multiple languages goes to 404 errors or to wrong category
Post by: jjk on June 05, 2012, 17:54:39 PM
I remember that some time ago I had a faulty menu entry in the Joomla 2.5.4 menu table, which produced wrong urls. I manually had to delete it from the database table and then set up a new menu item in Joomla in order to get it working correctly. Perhaps you have something similar.
Title: Re: SEO SEF routing with multiple languages goes to 404 errors or to wrong category
Post by: ereallstaff on June 07, 2012, 17:48:54 PM
Quote from: jjk on June 05, 2012, 17:54:39 PM
I remember that some time ago I had a faulty menu entry in the Joomla 2.5.4 menu table, which produced wrong urls. I manually had to delete it from the database table and then set up a new menu item in Joomla in order to get it working correctly. Perhaps you have something similar.

Everytime I save the path is calculated wrong, and gives me all that troubles.

With more investigation it's something related to the    JRoute::_(     method to build the url, or at least I had a similar problem with the search_module , that I fixed removing the Jroute and put a fixed url with no languages
Title: Re: SEO SEF routing with multiple languages goes to 404 errors or to wrong category
Post by: jjk on June 07, 2012, 19:55:49 PM
Did you try VM2 version 2.0.7d or SVN version? (see here: http://dev.virtuemart.net/projects/virtuemart/wiki/Setting_up_a_Development_Environment (http://dev.virtuemart.net/projects/virtuemart/wiki/Setting_up_a_Development_Environment)
Title: Re: SEO SEF routing with multiple languages goes to 404 errors or to wrong category
Post by: ereallstaff on June 08, 2012, 09:41:58 AM
Not still

I wish to go live first, and I momentanously solved modified by hand the path field of that category, without using upper case letters and no space

it seems to works at least
Title: Re: SEO SEF routing with multiple languages goes to 404 errors or to wrong category
Post by: sadrem on June 08, 2012, 19:26:36 PM
Hello,
I have site 2 languages and didn't have  any problem.
I think You missed up something in configuration.
If You don't want problems Remember the rule for joomla 2.5 multilingual site : every object (menu, menu item, module , article, category article...) must have language defined.

About 404 error : set absolute path  in joomla for log and tmp path. I mean not "/tmp" but "/home/public_html_..../tmp" 

Regards.
Title: Re: SEO SEF routing with multiple languages goes to 404 errors or to wrong category
Post by: ereallstaff on June 11, 2012, 16:50:28 PM
It was the Jroute method giving troubles in the template overrides

Removing this rule and editing by hand the values of patch in #_menu table it worked

Thanks