PHP Fatal error: Call to a member function getCollectionID() on a non-object in /www/webdev/c5/concrete/models/area.php on line 120

Permalink
Upgraded from 5.3.1 to 5.3.2 this morning and now I am getting this whenever loading any page in the Dashboard.

PHP Fatal error: Call to a member function getCollectionID() on a non-object in /www/c5/concrete/models/area.php on line 120

It seems like the sitemap / file manager work but now I am also getting some weird popup Ajax box with "More" in it and if you click on it it just takes you to some broken page.

Any thoughts, C5'ers?

Thanks!
joe

subversion
View Replies:
defunct replied on at Permalink Reply
defunct
Having the same problem as well, but so far only on a 404 error page.

Exact line and file though.
wltr replied on at Permalink Reply
wltr
In noticed that is error only occurs with upgraded versions. A clean install with 5.3.2 does not produce this error.

This leads me to believe that this is somehow database related.
Tony replied on at Permalink Reply
Tony
try adding this to the start of Area::get()
if(!$c || !method_exists($c,'getCollectionID')) return;


does that fix it, or does it just make another error show up?
defunct replied on at Permalink Reply
defunct
Which is

$cID = $c->getCollectionID();


obviously something is calling this method without someone passing the collection id to it properly...but where is that happening?

If you use the same idea there, the errors continue on down to line 325

$blocksToDisplay = ($alternateBlockArray) ? $alternateBlockArray : $ourArea->getAreaBlocksArray($c, $ap);
nathantgross replied on at Permalink Reply
nathantgross
I'm having the same problem. Any recommendations on how to correct it?

I just replaced the area.php file with a copy from a fresh install, works now.
bpysher replied on at Permalink Reply
Exact same error after upgrading as above along with:

"PHP Fatal error: method_exists() [<a href='function.method-exists'>function.method-exists</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;MyOwnBlockController&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /*/*/public_html/concrete/libraries/database_indexed_search.php on line 96"

Tried replacing area.php - no change

I've compared my block to the example block in the developer section and the core blocks and am not finding any monumental differences in how I'm doing stuff.

Is it possible that these errors are related?
arcanepain replied on at Permalink Reply
arcanepain
No problem on a fresh install, but on an upgrade, when I type an incorrect URL (eg:http://www.example.com/*something made up*) I get an unstyled error page, and a fatal error in area.php (ln. 120).

Tried replacing with new version and tried replacing with area.php from a successful fresh install...no joy.

Any fix on this yet?
Tony replied on at Permalink Reply
Tony
this problem should be fixed in the dev branch. try doing this to fix it in the meantime. go here: http://www.concrete5.org/dashboard/pages/single/... scroll to the bottom, and add both /404 and /page_not_found as single pages
arcanepain replied on at Permalink Reply
arcanepain
Great stuff...back in business.
RizzzO replied on at Permalink Reply
RizzzO
Has this problem ever been fixed? I ran into the same problem, see here:

http://www.concrete5.org/community/forums/installation/urgent_site_...

Any tipps? It's rather urgent...

Thanx

RizzzO
Spudster replied on at Permalink Reply
I'm getting this after the session times out, but the user is still on a restricted page. Any way to redirect to the home page without getting this error?
SpeedBump replied on at Permalink Reply
SpeedBump
added page_not_found but don't have a /404 for add.