Use MageBridge with Advanced Module Manager - Yireo

Step-by-step: Configuring sh404SEF [INCOMPATIBLE]

While the standard SEF of Joomla! 1.5 is sufficient in most cases, some people prefer sh404SEF. MageBridge does not support the usage of the sh404SEF-router. However, sh404SEF version 2.0 and higher allow you to use the original Joomla! core SEF so that sh404SEF becomes compatible with MageBridge. This tutorial outlines these steps.

WARNING: sh404SEF is not compatible with MageBridge

Because the architecture of sh404SEF requires all URLs to be generated by the sh404SEF router, but because all Magento URLs are already generated by Magento before they actually arive in Joomla!, the extension sh404SEF is not compatible with MageBridge. Efforts to make things work, might pay off. But Yireo does not give support for this issue.

Configuring MageBridge within sh404SEF

To make sure sh404SEF is using the extension-file offered by MageBridge, you need to configure sh404SEF accordingly. Browse to the sh404SEF component in the Joomla! backend.

sh404sef0

Next navigate to the sh404SEF Configuration.

sh404sef1

Click on the By Component tab. This should list all available Joomla! components including MageBridge. Modify the following parameters for the row of magebridge:

  • URL processing: Use default handler
  • Use sh404SEF plugin if available: Use component or core plugin or Use Joomla! router.php

mb_sh404sef_bycomponent

mb_sh404sef_bycomponent2

If this is the first time you enable MageBridge, we recommend you purge all 404 logs from the sh404SEF Control Panel. You do not need to change any settings in MageBridge itself.

Configuring other sh404SEF options

Within the sh404SEF configuration, make sure to set the option 301 redirect from JOOMLA SEF to sh404SEF to No. Otherwise, any URL that is generated following the regular Joomla! core-router, will be redirected to the sh404SEF router which does not interpret Magento URLs.

Enabling the experimental SEF-spoofing option

MageBridge relies on the Joomla! core-router being called on every request. When enable the sh404SEF option Enable URL optimization (one of the main features of sh404SEF), the Joomla! core-router is bypassed and replaced with the sh404SEF router. But this router does not handle Magento URLs well. For this, MageBridge does not offer any official compatibility. However, if you are willing to run MageBridge in an unsupported environment, you might try the following:

Within the MageBridge System Plugin (to be managed through the Joomla! Plugin Manager) you can find various settings which should normally not be tweaked. One of these options might give you full compatibility with sh404SEF: When enabling the option Spoof third party SEF, the plugin interprets the current URL and tries to detect the MageBridge Root Menu-Item within. If it is detected, the request is interpreted correctly.

When this option fails to work, you probably receive a 404-error from sh404SEF. Make sure that you have a MageBridge Root Menu-Item enabled in your menus. Also make sure that the MageBridge option Use Root Menu-Item is enabled.

Debugging: Check if router.php is being called

This integration between MageBridge and sh404SEF relies on a feature (backward compatibility of sh404SEF with the Joomla! core router.php) that has had its flaws in the past: Some released of sh404SEF did not call the router.php file at all, making the steps above pointless and an integration between sh404SEF and MageBridge useless.

You can check for yourself whether sh404SEF actually calls the MageBridge router.php file. To test this, make a backup of your Joomla! files, then open up the file components/com_magebridge/router.php and place the following line somewhere in the top (but after the <?php opening statement):

die('MageBridge router.php is included');

Next, open up a MageBridge page on the Joomla! frontend. The page should crash with the text you entered within the die() statement. If this does NOT happen, it means that the sh404SEF functionality of calling the router.php file does not work. Your URLs probably look something like http://JOOMLA/option,com_magebridge/XYZ. You should place a question then on the sh404SEF forums to assist you with this problem.

Created on Wednesday, 09 September 2009
Modified on Wednesday, 06 July 2011

About Yireo

Yireo tries to help webdevelopers build successful Joomla! and Magento sites.

More about Yireo