Need help with the Administration of your Joomla! 2.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
rgipr
Joomla! Fledgling
Posts: 2
Joined: Fri May 04, 2012 10:40 am

Hi folks,

I have strange behavior on one of my sites:

I couldn't find any useful information on my internet search, the only hint I found:
Search Engine Friendly URLs - as soon as I switch it of, the links are working again.

I also found out, there is a table called "j25_menu" in my database where the field "path" shows exactly this wrong link after the creation. I tried to change the value there (remove the "Links/" in front of the "newmenu) and it works. As soon as I save the menu item in the backend again, it points to the wrong location again.

As an additional information: the site was migrated from 1.5.24 to 2.5.3 with the migration script mentioned in the official documentation...

Thanks,
ipr

javix
Joomla! Apprentice
Posts: 13
Joined: Sat Jan 31, 2009 10:33 pm

Hi,

I have exactly the same problem.

If I enable SEF Urls, my menu items stop working!

In my case the language is spanish and I get /Búsqueda Inteligente/name-of-menu

This is the most weird thing I have never experienced in Joomla!

SEF Urls is a must.

Thank you @rgipr for the table hint.
There is this "path" field, that states "The computed path of the menu item based on the alias field."
but it is not. In my case, it had "Búsqueda Inteligente" in front.

Are we the only ones with this behaviour?

I am using 2.5.4., a clean installation.

I was trying joomla 2.5. for the first time with this website, but I am now wondering if I should go on this path. Seems risky...

javix
Joomla! Apprentice
Posts: 13
Joined: Sat Jan 31, 2009 10:33 pm

They are having the same issue here:
* http://forum.joomla.org/viewtopic.php?f=579&t=702203
* http://forum.joomla.org/viewtopic.php?f ... &p=2805667

Probably there is more people having this.

infograf768
Joomla! Master
Posts: 19120
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

This should solve it.

Make sure your non-core extensions are up-to-date.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

javix
Joomla! Apprentice
Posts: 13
Joined: Sat Jan 31, 2009 10:33 pm

OK, that fixes it. Thank you.

Why would that happen in the first place?

Thanks, regards

rgipr
Joomla! Fledgling
Posts: 2
Joined: Fri May 04, 2012 10:40 am

Thanks, great success!

igroove
Joomla! Fledgling
Posts: 1
Joined: Sun Jan 23, 2011 4:09 pm

Thanks,
Jason

pxforti
Joomla! Hero
Posts: 2755
Joined: Wed Apr 04, 2007 8:54 pm
Location: Driggs, Idaho

I spent 3 hours chasing this issue around. Finally found to correct search terms to find this tread. I was getting some serious heartburn. Just wondering why this happens and why it's necessary to "Rebuild" the menu.

Any ideas?
Joomla Website Design / CS-Cart Website Design
http://writenowdesign.com

dvlancer
Joomla! Apprentice
Posts: 9
Joined: Thu Jul 26, 2012 1:22 am
Location: Australia
Contact:

I had the same issue after migrating J1.5 to J2.5.6. Except I get "Categories/" appended to a menu path column in the menu table.

Rebuilding fixed the menu, but only until a new menu was created or an existing menu was edited.

I narrowed the source of this problem down to the nested sets data stored in #__menu table (lft and rgt columns)

The odd prefix is added to the menu path after the code below (JROOT/libraries/joomla/database/table/menu.php lines 188-202, J2.5.6) is executed.

Following the code snipped below is an SQL query that returns a result requested by $this->getPath(). This result uses nested sets data stored in #__menu table. In my case I had a menu item with menutype: menu, title: com_weblinks_categories, alias: Categories, lft 44 and rgt 79, which looked odd, compared to other joomla installs. As a result "Categories/" was appended to all new and edited menus as per code sniped below ($newPath = trim(implode('/', $segments), ' /\\');) I fixed the issue by searching for the right most value (the highest rgt value), which was 74 in my case, and replaced values for lft (44) and rgt (79) with the next two consequent numbers, which were 75 and 76 respectively. Then I updated rgt value for row with id = 1 and title = Menu_Item_Root to 77 (which is the right most value + 1) This permanently fixed the problem described above. The above values will depend on your data in #__menu table. I wonder if this behaviour is only common to Joomla site that were migrated from J1.5 using jupgrade. Code: Select all  // Get the new path in case the node was moved$pathNodes = $this->getPath();$segments = array();
foreach ($pathNodes as$node)
{
// Don't include root in path
if ($node->alias != 'root') {$segments[] = $node->alias; } }$newPath = trim(implode('/', $segments), ' /\\'); // Use new path for partial rebuild of table // Rebuild will return positive integer on success, false on failure return ($this->rebuild($this->{$this->_tbl_key}, $this->lft,$this->level, $newPath) > 0); Code: Select all SELECT p.* FROM j25_menu AS n, j25_menu AS p WHERE n.lft BETWEEN p.lft AND p.rgt AND n.id = 2 ORDER BY p.lft Let me know if there is a better way to solve this. peanuts68 Joomla! Apprentice Posts: 8 Joined: Wed Jul 10, 2013 8:54 am ### Re: new menu item - wrong address The post by dvlancer was very helpfull, I'm struggling with the same issue, not solved yet though. I checked my #_menu table and found out that several items added since upgrading to 2.5 have duplicate values for lft and rght. For instance com-newsfeeds-categories has left 37 and right 38. My recently added menu-item also has lft 37 and rght 38. So when I edit my menu-item and save it to the database, the script mentioned above checks for the alias of the item with the lft-value 37, copies the alias, and uses it to rewrite the alias for my menu-item. My menu-item than suddenly has the alias feeds/categories/item and my menu now produces a 404-error. Rebuilding the menu temporarily fixes this. But everytime my menu-item is modified, the error returns. Changing the left and right values manually has no effect, after rebuilding the menu the old values are placed back again in the table. Anyone know how to repair this? It looks like problems with the assets-table, but menu's aren't listed there. Duplicate left and right values seem to be the cause of this. peanuts68 Joomla! Apprentice Posts: 8 Joined: Wed Jul 10, 2013 8:54 am ### Re: new menu item - wrong address Found some additional information on the Jupgrade-website. I used Jupgrade to migrate from 1.5 to 2.5. It seems Jupgrade is causing the problem. The backup I made after upgrading shows a correct table, the problem starts when I create or modify a new menu-item. Here's some info: http://redcomponent.com/92-jupgrade/127 ... mitstart=0 I haven't tried the solutions mentioned there yet. peanuts68 Joomla! Apprentice Posts: 8 Joined: Wed Jul 10, 2013 8:54 am ### Re: new menu item - wrong address The method described by 'dima' on the Red Component Forum worked for me: (Joomla 2.5.14) First my English is not very good. I tried to solve this problem two days and found how to solve it. I don't know if it is the best way to solve it, but in my site it works good here administrator\components\com_menus\models\item.php in function public function save($data)

at the end before

return true;

$table->rebuild(); Helvecio Joomla! Explorer Posts: 468 Joined: Wed Oct 10, 2007 2:29 pm Location: Rio de Janeiro - Brazil Contact: ### Re: new menu item - wrong address What I find really weird is that there is a menu item to com_banners that I NO idea how it wound up there. This site I'm working on never used banners. Helvecio "Elvis" da Silva Graphic and Web Designer Joomla Website Developer http://hlvc.design piersol Joomla! Intern Posts: 66 Joined: Wed Sep 26, 2007 6:11 pm Location: Indianapolis ### Re: new menu item - wrong address My issue was also one where "Banners" was added to my sef url for new menu items. It broke the link and no new menu items worked. Old ones remained fine. Cache wasnt my issue. But this solution did work indeed on my J3.4.5 site. First my English is not very good. I tried to solve this problem two days and found how to solve it. I don't know if it is the best way to solve it, but in my site it works good here administrator\components\com_menus\models\item.php in function public function save($data)

at the end before

return true;