Fix for mainmenu-xx in Joomla SEF urls

When converting a Joomla 1.0 site to 1.5 and activating SEF URLs, you may discover that the URLs suddenly have the menuname in them. For instance like this: http://example.com/about-us-mainmenu-12. This is because of changes to aliases in the migration process. A menu item titled “About us” might have had the alias “about-us” in Joomla 1.0, but in Joomla 1.5 it is given the alias “about-us-mainmenu-12″ after the migration, where 12 is the menu item’s ID, or Itemid. Here is a fix you can run on your database to correct all of this.

Continue reading…