This website uses cookies to improve your experience and deliver relevant information.

on Wednesday, 20 July 2011

Reported problem with Joomla! 1.7 upgrade - Fatal error: Cannot instantiate abstract class JDatabaseQuery

We came across a problem when updating one of our Joomla! 1.6 sites to 1.7, which relates to Joomlart templates.

Thanks to John47 for his post on the Joomla! forums which identified a fix for this issue:

This is a problem with Joomlart templates, causing the following error:

Fatal error: Cannot instantiate abstract class JDatabaseQuery in mysite/plugins/system/jat3/jat3/core/joomla/modulehelper.php on line 292

and can be resolved by amending the following:

Change the code in the modulehelper.php file

yoursite/plugins/system/jat3/jat3/core/joomla/modulehelper.php

The problem code is on line 292

$Itemid = JRequest::getInt('Itemid');
$app = JFactory::getApplication();
$user = JFactory::getUser();
$groups = implode(',', $user->getAuthorisedViewLevels());
$db = JFactory::getDbo();
jimport("joomla.database.databasequery");
// comment out the line below
// $query = new JDatabaseQuery;
// add the line below
$query = $db->getQuery(true);
$query->select('id, title, module, position, content, showtitle, params, mm.menuid');
$query->from('#__modules AS m');
$query->join('LEFT','#__modules_menu AS mm ON mm.moduleid = m.id');
$query->where('m.published = 1');

 

We're specialists in Content Management Systems Want to work with the experts?

Virya Group provides a range of solutions to your technology needs