How to solve Joomla Error " The template for this display is not available."

Shiva picture Shiva · Mar 29, 2014 · Viewed 14.7k times · Source

Hi all thanks for taking time to read my question, I was using iPages as my host since past few year now I got a new hosting provider so I am Migrating my Joomla! 3.1.5 from iPage to my new hosting provider.

Here is the steps I have followed ^1.

  1. FTP backup iPage
  2. FTP upload on Newhosting
  3. Database Export (From Old server)
  4. Database import (To new Server)
  5. Configuration.php modification

Here is the config Details, These are only detail I changed with new data

var $host = 'localhost'; 
var $user = 'the_db_username';
var $password = 'the_db_password';

After all this I am not able to see previous look of website. I am getting login option on home page when i am logging in it says:

"The template for this display is not available.Please contact a Site administrator."

I can access to the admin panel using admin credentials but same error message I am getting there.

This is the home page of website

This is admin panel

Any suggestion..!!

Thanks

Answer

Riccardo Zorn picture Riccardo Zorn · Mar 31, 2014

This error is raised when the chosen template (in administrator->extensions->templates) for either the admin or the site is not available.

Since you made a full ftp backup it can be one of two things:

  • the template was not included in the backup; possibly because of wrong privileges (sometimes the ftp account and the web account run under different users)

  • the template is not readable by the user running the current apache: it could have wrong permissions or wrong ownership or both on the new server.

Depending on the case above, you might want to re-check your entire installation, and run an update package just to be on the safe side.

The third, albeit unlikely, option is that in the database the #__templates table was - for some funny reason - not copied over or somewhat corrupted.

The error message is a bit misleading (what is a display?).

Update with solution:

The message is generated in the libraries/cms/application/site.php file by the following lines:

if (!file_exists(JPATH_THEMES . '/' . $template->template . '/index.php'))
{
    $this->enqueueMessage(JText::_('JERROR_ALERTNOTEMPLATE'), 'error');

and JPATH_THEMES is defined in the /includes/defines.php as

define('JPATH_THEMES',        JPATH_BASE . '/templates');

So the error is most definitely the missing template.

I was able to reproduce this on another Joomla 3.2 site simply by selecting Extensions->Templates->**and making **Bluestork the default template. Switch it to Isis and the issue will disappear; I guess you could do the same for the frontend choosing another template.