500 error when migrating the joomla site between servers


1. download the all the files from the original server.

2. export the db using to a sql file.

3. upload the files to the new server.

4. create mysql db and new db user in the new server.import the exported sql to the newly created db.

5. edit the configuration.php. modify the user/dbname/password to the new ones.

6. if you have a php.ini, do remember to remove it or rename to php.ini.backup. otherwise 500 internal error will be waiting for you.

Step 5 and 6 is the part we tend to ignore and forget. 


image too large in Virtuemart

The problem is that:
components / com_virtuemart / views / productdetails / tmp / default.php
line 138
<?php echo $this->product->images[0]->displayMediaFull(‘class=”medium-image” id=”medium-image”‘,false,”class=’modal'”,true); ?>
in the stable version, but:
<?php echo $this->product->images[0]->displayMediaFull(‘class=”product-image”‘,false,”class=’modal'”,true); ?>
I solved the problem so I’m in:
components / com_virtuemart / assets / css / vmsite-ltr.css
at line 154
.main-image img.product-image,.featured-view .spacer img,.latest-view .spacer img,.topten-view .spacer img{max-width:100%;height:auto;width:auto;}
product-image replaced by medium-image

MVC in Joomla




  1. require_once( JPATH_COMPONENT.DS.’controller.php’ );
    JPATH_COMPONENT is the absolute path to the current component.
    DS is the directory separator of your system
  2.  Controller class extends JController and override display method
  3. View Claa extends Jview
    1. class HelloViewHello extends JView
        function display($tpl = null)
            $greeting = "Hello World!";
            $this->assignRef( 'greeting', $greeting );
  4. Last step is to create a template:
    // No direct access
    defined('_JEXEC') or die('Restricted access'); ?>
    <h1><?php echo $this->greeting; ?></h1> 
    Original Article   We can also add model and use database in model.

Warning: Invalid argument supplied for foreach() in … components\com_content\helpers\route.php on line 135

Joomla requires a menu item for every category. Otherwise, ”

 Warning: Invalid argument supplied for foreach() in … components\com_content\helpers\route.php on line 135

Just create a hidden menu and and Category List type for each category



Warning: require(__DIR__/invoice_items.php) [function.require]: failed to open stream: No such file or directory in /home/XXXXXX/domains/XXXXXX/public_html/components/com_virtuemart/views/invoice/tmpl/mail_html_pricelist.php on line 22




In file components/com_virtuemart/views/invoice/tmpl/mail_html_pricelist.php


Code: [Select]



Code: [Select]

echo $this->loadTemplate('items');
edit by Milbo, just directly added the fix