Page 1 of 1

[Solved] Fatal error after upgrading test site...

Posted: Sat Aug 20, 2011 7:06 pm
by janaf
After upgrading from the latest 1.9.x to 1.10 (without problems) I could log on to the admin page once, see the front end once, with a number of smarty errors from invalidated module tags.

First time I click on a an admin pages menue, now I get, both on admin and front end:
Fatal error: Call to a member function get_tasks() on a non-object in /var/www/testsite/lib/classes/class.CmsRegularTaskHandler.php on line 87
I have a clean 1.10 install working fine on the same system.

So I suppose its a core error but caused by some module.. ???

Re: Fatal error after upgrading test site...

Posted: Sat Aug 20, 2011 7:12 pm
by calguy1000
Nope, that one appears to be a genuine bug. in the modules_with_capability cache stuff.

I've commited a fix to it to svn, and here's the diff:

Index: class.CmsRegularTaskHandler.php
===================================================================
--- class.CmsRegularTaskHandler.php (revision 7338)
+++ class.CmsRegularTaskHandler.php (revision 7340)
@@ -82,6 +82,7 @@
if (!$modules) return;
foreach( $modules as $one )
{
+ if( !is_object($one) ) $one = cms_utils::get_module($one);
if( !method_exists($one,'get_tasks') ) continue;

$tasks = $one->get_tasks()

Re: Fatal error after upgrading test site...

Posted: Sat Aug 20, 2011 8:33 pm
by janaf
The fix is confirmed OK on my install...