Virya Technologies Blogs

Blogs from Virya Technologies staff

Posted by Ruth Cheesley
Ruth Cheesley
I am the owner and Director of Virya Technologies, with the responsibility for leading the website design team...
User is currently offline
on Wednesday, 20 July 2011
in Joomla! Content Management System

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');

Rate this blog entry
I am the owner and Director of Virya Technologies, with the responsibility for leading the website design team.

I am primarily involved with the day to day management of our website projects, ongoing support contracts and liaising with our clients from across the world.
Trackback URL for this blog entry

Comments

Guest
adam Saturday, 23 July 2011

Also had to apply same update to base.class.php located in
yoursite/plugins/system/jat3/jat3/core/menu/

Guest
Louigi Tuesday, 26 July 2011

Adam why did you have to apply the same to the menu. after i followed the instructions mine worked again fine. will there be a problem with the menu???

Guest
Louigi Tuesday, 26 July 2011

@ Ruth. Thanks for your insight. You cant believe the amount of time you saved me.

Ruth Cheesley
Ruth Cheesley
I am the owner and Director of Virya Technologies, with the responsibility for leading the website design team...
User is currently offline
Ruth Cheesley Tuesday, 26 July 2011

We didn't need to apply Adam's suggestion on any of our JA templated sites, perhaps it relates to an older version of the framework or one particular template?

Ruth

Ruth Cheesley
Ruth Cheesley
I am the owner and Director of Virya Technologies, with the responsibility for leading the website design team...
User is currently offline
Ruth Cheesley Tuesday, 26 July 2011

Louigi: No problem, it's the kind of thing that usually takes us ages to figure out so we always write a blog post about it to shorten that timeframe for others! Actually it was John47 on the Joomla! forums who came up with the solution so make sure you thank him too!!!

Ruth

Guest
Miley Sunday, 11 September 2011

Hi ruth, I GOT same problem, PLease help me,
Fatal error: Cannot instantiate abstract class JDatabaseQuery in mysite/plugins/system/jat3/jat3/core/joomla/modulehelper.php on line 292

I have worked for month on my site, i need ur help please

Mikey

Ruth Cheesley
Ruth Cheesley
I am the owner and Director of Virya Technologies, with the responsibility for leading the website design team...
User is currently offline
Ruth Cheesley Monday, 12 September 2011

Mikey,

Did you apply the fix which is mentioned in the post above? This should fix your problem immediately.

Ruth

Guest
Robin Monday, 26 September 2011

I also had to do Adam's fix ... just upgraded to J 1.7, and running JA Teline iv version 1.2.0 if that helps anyone :D

Guest
alessandro Friday, 07 October 2011

thanks vary much it worked also forn me!!! upgraded J1.6.6 to 1.7.0 with JA Teline iv 1.1.0

Guest
Rogier Wednesday, 07 December 2011

Thanks for this!

Guest
Pedro Pisandelli Thursday, 29 December 2011

Ruth, using JAT3_blank Template from Joomlart, when you try to assign a menu item to a module you get the same error in "yoursite/plugins/system/jat3/jat3/core/menu/base.class.php" on line 329. Doing your fix will resolve the problem. So Adam's suggestion is valid.

Guest
Pedro Pisandelli Thursday, 29 December 2011

And...
Congratulations for the Blog! ;)

Guest
olifier Friday, 13 April 2012

wow! many thanks! I just solved my problem with your solution!

Leave your comment

Guest
Guest Tuesday, 22 May 2012

Looking for our open source software?

viryasoftwarelogo

We release and support our open source software at Virya Software

Find us on

facebook    linkedin    twitter     youtube    vimeo    ViryaTechnologiesJoomlaResources    ViryaTechnologiesonTechnorati    rss

Virya Technologies Newsletter

Receive all the latest tips, news and reviews from Virya Technologies.

Come and meet us!

JUN
01

01.06.2012 07:30 - 09:30
Ipswich Connected Business Breakfast

JUN
01

01.06.2012 12:00 - 17:20
Ecademy BlackStar First Friday Working Lunch

JUN
14

14.06.2012 19:30 - 22:00
Joomla! User Group Suffolk Meeting

JUL
06

06.07.2012 07:30 - 09:30
Ipswich Connected Business Breakfast

JUL
06

06.07.2012 12:00 - 17:20
Ecademy BlackStar First Friday Working Lunch

The latest from Virya Technologies

Virya Technologies After an awesome #jab12 event we are offering 20% discount on all extensions until 7th June - use JAB12 coupon code at http://t.co/XrDJFRbq
Monday, 21 May 2012 07:46
twitter Follow Viryatech on Twitter