Joomla- cutomizing Custom error (404) pages
Custom error pages
Joomla! uses the templates/system/error.php file to handle several HTTP Status errors, including “403 Forbidden”, “404 Not Found”, and “500 Internal Server” Errors. You can style the error results, if desired.
It is important to understand that the error.php is an independent file from Joomla!. Plugins do not run on the file. You cannot include modules or use <jdoc:include> statements.
Overriding the System Error Results
To override the system error results, copy the templates/system/error.php file into your templates/<template-name> directory.
If it finds one, Joomla! will use the error.php file from the current template, in place of the system file.
You can format the page, as desired, to match your template.
Overriding the System Styling
If you want to change the styling, copy the templates/system/css/error.css file into your templates/<template-name>/css directory.
Next, update the your templates/<template-name>/error.php file to reference the new location of the stylesheet by changing this line, accordingly:
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/error.css" type="text/css" />
For eg.
<link rel=”stylesheet” href=”<?php echo $this->baseurl; ?>/templates/<?php echo $this->template;?>/css/error.css” type=”text/css” />
Then, simply change the error.css, as desired, for your styling requirements.
Customizing Error Messages
You can add conditional logic to vary the message returned, dependent upon the specific error code.
Here is an example of how to trap a 404 error and provide a custom message.
<?php if ($this->error->code = '404') { ?> <div id="errorboxheader">Page not found</div> <div id="errorboxbody"><p>Sorry! That page cannot be found.</p> </div> </div> <?php } ?>
HTTP status code
When a request is made for a page on your site, the server returns an HTTP status code in response to the request. Joomla! returns a ‘200 - the server successfully returned the page’ for error pages. This is problematic for those working with Google Webmaster Services and trying to get a sitemap resolved.
If you want Joomla! to return a status code for the error, you can do so by adding logic before the DOCTYPE line, as follows:
<?php if ($this->error->code = '404') { header("HTTP/1.0 404 Not Found"); } ?>
Changing the Favicon Of Your Joomla Site
The favorite icon (commonly referred to as the favicon) is an image file that is 16×16 pixels, and is normally named favicon.ico.
You need to upload it to the template directory of the template that you are using. If you are using multiple templates you’ll need to upload it to different directories. If I were replacing the favicon in the Joomla! 1.5 default template Rhuk_Milkyway, You need to upload the favicon to: joomlaroot/templates/rhuk_milkyway/favicon.ico
Since your browser has already downloaded (cached) your old favicon, you probably won’t see the changed icon till you clear your cache and refresh (you may have to refresh multiple times before you see the changed icon).
Joomla Template Install: Another template is already using directory
“Template Install: Another template is already using directory: ‘joomlaroot/templates/template_name’”
The error message suggest, another template with the same name is already installed. There is also the possibility that the same template had been installed, but not properly uninstalled earlier. Either way, to get the template you have to work you will have to make sure to totally eradicate the previous template.
Solution to this is Uninstall the previous template.
Extensions–>Install/Uninstall.
Displayed is the
Extension Manager.
On the list of the different extension types, select
Templates.
Click the radio button next to the template you wish to uninstall, and then click uninstall. The template should be successfully deleted.
In case the template does not uninstall properly, you can log into your site via FTP, and delete it manually.
Log into your site via FTP, and go to this directory:
joomlaroot/templates/ click on the template to be removed and then delete it.
joomlaroot/templates/template_name
Transfer Files or Backup from one Server to another Server
1. cPanel Remote Backup
This is the most easiest method used to transfer whole site backup from server to server. It makes use of the “Backups” feature in cPanel and needs to be enabled by your host.
To use this
1. Open the Backups manager in your cPanel and click “Generate/Download a Full Backup”
2. For Backup destination choose “Remote FTP Server (Passive Mode Transfer)”
3. Enter the FTP server, username and password
4. Enter the FTP server port (this is usually “21″)
5. Leave Remote Dir field empty
6. Hit “Generate Backup”
Your backup will now be passively generated and transfer from server to server using the net2ftp protocol. If you don’t see this option in your cPanel then you need to ask your host to enable it.
2. SSH
SSH is a network protocol that allows data to be exchanged over a secure channel between two computers. Now a days nearly every web host provides this on request. You will need the PuTTy client to connect to your server via SSH.
Once you are connected via PuTTy just follow the instructions:
1. Login to server 1 via SSH and open the folder which you want to backup e.g.
cd /home/somepath/to/yourwebsite/public_html
2. Make a compressed archive out of this folder using the command
tar -cvf sitepack.tar ./
3. Login to server 2 via SSH and use the command below to fetch the backup from server
wget yourdomain.com/sitepack.tar
4. Now uncompress the archive using the command
tar -xvf sitepack.tar
Error loading feed data : JCE EDITOR
If you encounter the pink “Error loading feed data” banner message with the installation of JCE.
Follow the following steps to remove it
Extensions –> Module Manager –> Administrator –> JCE Latest News Module –> Delete (or disable).
The pink Error loading feed data banner message should be gone.

