MageBridge Troubleshooting Guide
Combining Joomla! and Magento into a single site can be very complicated. If you're new to either Joomla! or Magento, using MageBridge might not be that straight-forward. Knowledge of both Magento as well Joomla! is needed to make your MageBridge shop a succes. This guide tries to help you out with troubleshooting problems that might occur.
Index
- Troubleshooting JavaScript
- Disable caching
- Test it within one application
- Checking MageBridge
- Checking MageBridge
- Internal browse-test
- Check the API-credentials
- Reading Apache error-logs
- Reading Magento logs
- Doing a clean test
- Switch on debugging in MageBridge
- About the debugging bar
- Check the bridge itself
- Help from Yireo
Troubleshooting JavaScript
Many of the problems that might occur are actually based on JavaScript, and the first check you should always make (and probably on a regular basis), is check whether your shop contains JavaScript errors: If it does, you have configured something that causes a conflict.
Only real browsers like Firefox and Chrome, ship with an Error Console that is reporting JavaScript errors. Other troubleshooting tutorial in this same section help you to deal with these JavaScript errors.
Disable caching
As a first step, you need to disable all caching. While MageBridge provides caching, it's considered to be an expert-option - so if you run into weird problems, disable MageBridge caching right away. It's also neccessary to disable caching in the Joomla! Global Configuration. Within the Magento Admin Panel, disable all caches under Cache Management.
After disabling all caching, check things again.
Test it within Magento first
If a problem occurs with MageBridge, the first and most basic troubleshooting step is to isolate the problem. The problem could be due to Joomla!, Magento or MageBridge, but unfortunately Yireo can not support Magento as a whole.
The first step is to test if the problem also occurs in Magento stand-alone, or only with MageBridge. Let's say there's a problem with the following URL:
http://JOOMLA/shop/sony-vaio-vgn-txn27n-b-11-1-notebook-pc.html
It doesn't matter if it shows a blank page, some 404-message or just some ugly design-issues - we just have a problem within that page. This could be due to Joomla!, but also to Magento or MageBridge. Because this page is originating from the Magento application, the page could also be displayed directly within Magento as a stand-alone application - so without Joomla! or MageBridge.
Within Joomla! the URL shows also the Magento URL. In the example above the menu-item with URL http://JOOMLA/shop points to the Magento shop as a whole. The text sony-vaio-vgn-txn27n-b-11-1-notebook-pc.html represents a specific Magento URL. We can append that text to the Magento web-URL:
http://MAGENTO/sony-vaio-vgn-txn27n-b-11-1-notebook-pc.html
If the same problem occurs on this Magento URL, we can safely say that this problem is not related to Joomla! or MageBridge, but instead to Magento itself. The issue needs to be resolved in Magento first, before troubleshooting Joomla! and/or MageBridge any further.
Make sure you configure the same settings are used in Magento stand-alone, as in the MageBridge environment. Because of the multi-site mechanism of Magento, you could configure one theme for Magento stand-alone and another theme for MageBridge - this makes troubleshooting things more difficult.
Component preview
If the component-area shows a problem, it's a good idea to isolate the problem from other Joomla! extensions (template, modules). By adding tmpl=component to the URL, Joomla! will display only the component. If the problem disappears in the stripped-down screen, the problem is most likely not related to the component, but to other Joomla! extensions being used on the same page.
http://JOOMLA/shop/checkout/cart?tmpl=component
Checking MageBridge
If you suspect something is wrong with the bridge, it's also wise to check if the bridge-configuration is still intact. Within the Joomla! Administrator you can browse to Components > MageBridge > Settings and click on Apply in the toolbar. This will verify some settings and check if the MageBridge API is working. If it's not, you'll need to resolve this before going back to the frontend site.
It's also smart to check the page Components > MageBridge > System Check, to make sure that all MageBridge plugins are functioning.
Internal Browse Test
If you suspect there's anything wrong with the bridge-connection from Joomla! to Magento, you can also use the browse-test to see how Joomla! is able to fetch content from Magento. From within the System Check page (in the section Suggestions) you can find a link to the Internal Browse Test.
Within the IFRAME, some kind of JSON-encoded message should appear or just a regular SUCCESS or ERROR message. If the JSON-code looks like the following (or at least similar), this is a good sign - the bridge is functioning properly. If a SUCCESS is reported, it's also a good sign. If an ERROR is reported, the bridge is not functional.
{"meta":{"type":"meta","data":{"state":"license failed","extra":null}}}
If it shows a 404-page or some error, you need to resolve that. If the issue is hostname-related, make sure either DNS is fully functional or your hosts-file is setup correctly (also remember that for the hosts-file to work, you will need a correct nsswitch.conf). Such changes can only be made by the owner of the webserver (system administrator or hosting provider).
Check the API-credentials
Things to check involve the Magento hostname and basedir, but also the API-username and API-key (which acts like a password). Because the API-user needs to be properly configured in Magento as well, it might be wise to login to the Magento Admin Panel as well and navigate to System > Web Services > Users and check if the user exists and if the assigned user-role has the right privileges.
Reading Apache error-logs
If something goes terribly wrong within your webserver, chances are big that something is logged somewhere. If the problem is related to errors in the PHP-code, these errors are logged into the webserver logs. In most web-environments every domain has its own logfile, so if Magento and Joomla! reside on different domains each has its own error-log.
If you're in an Apache environment, look for something like the Apache error-log. If you are using a shared hosting environment, probably you also have access to some kind of control panel (DirectAdmin, CPanel) which allows you to view or download webserver-logs as well.
Reading Magento logs
Newer versions of Magento also have the ability to log errors within the Magento filesystem. In the System Configuration you need to enable logging first under the Developer tab.
- MAGENTO/var/log/system.log
- MAGENTO/var/log/exception.log
In addition, MageBridge also keeps its own debug-log once debugging is enabled from the Joomla! side:
- MAGENTO/var/report/magebridge.log
Doing a clean test
When you have determined that a problem exists in MageBridge, but not in Magento, you might be tempted to say that the problem is residing in MageBridge itself. But still, third party Magento extensions could contain problems (bugs) that only occur in a real multi-site environment (as provided by MageBridge).
To do a clean test, it's best to disable third party Magento extensions to see if this solves the problem. While modules can be disabled through the Magento Admin Panel, this could lead to disaster. It's safer to remove the XML-definition of a third party extension on the filesystem:
MAGENTO/app/etc/modules/
In the folder app/etc/modules, every Magento module is defined in a corresponding XML-file. Rename the XML-file or move it to a temporary folder. Next, refresh the Magento cache to make sure the XML-code is not cached. This should very effectively disable a certain Magento module.
Switch on debugging in MageBridge

Next to the webserver-logs, MageBridge also logs things. This is disabled by default, because every log-entry requires a database query and degrades the performance of your site. However, if a problem occurs it's wise to enable debugging from within the MageBridge Settings in the Joomla! Administrator. It's also required that you add the IP-address you want to debug to the list of IP-addresses in the same screen.
As soon as you start debugging, you can view the debugging messages from within Components > MageBridge > Settings. Most messages are probably useless to you, but you can look for messages of the type Error, which indicate that something really goes wrong. When posting on the forum, export the logs first, ZIP the resulting file and add it as attachment to your post.
Remember to disable debugging when you're done. If you don't, the Joomla! database will be flooded by debugging messages. If you want to clean the debugging-messages, just click on Delete in the toolbar.

About the debugging bar
Once you start debugging, on the frontend also a debugging-bar should appear. This debugging-bar lists possible debugging-messages on the frontend, but it most importantly also displays a link to the Magento page equivalent to the current MageBridge page. This allows you to easily test if a certain problem is also occurring in Magento, or only in MageBridge.
If the debugging-bar is not showing on the Joomla! frontend, this could be because your Joomla! template is not following the Joomla! templating standards completely. According to these standards, a template should have a message-box where components like Articles or MageBridge can print their messages:
<jdoc:include type="message" />
Check the bridge itself
One thing that could also be checked is the MageBridge entry-point into Magento. Within the base of the webdirectory of Magento there is an "index.php" file that is used by Magento itself to start the application. MageBridge however uses a different file called "magebridge.php" plus a helper-file called "magebridge.class.php". Both files need to be in place and have sufficient privileges on the webserver.
You can check for the basic functionality of this bridge entry-point by accessing the following URL:
http://MAGENTO/magebridge.php
If you get JSON-output like the following, the problem is not related to this entry-point.
{"meta":{"type":"meta","data":
Help from Yireo
If the whitepapers and FAQ on this website can't help you out, you can ask for support on the dedicated Yireo MageBridge forum. Please use the forum instead of mailing us - this way we can help you plus enhance the knowledge-base available to all customers. If your problem-description contains sensitive data, you can still contact us at support [Dd]
Created on Friday, 26 June 2009Modified on Friday, 11 March 2011
More tutorials in this section
- MageBridge Troubleshooting Guide
- MageBridge FAQ: General Troubleshooting
- MageBridge FAQ: Installation issues
- MageBridge FAQ: User-related issues
- Users are not synchronized
- Bridge is not available
- Magento checkout doesn't work
- Solving 404 Not Found errors
- MageBridge output tests
- Troubleshooting the MageBridge trial-version
- Solving 500 Internal Server Errors
- Debugging conflicts with other Magento extensions

