Page 1 of 4

Fatal error: Call to a member function getContent()

Posted: Wed Apr 13, 2011 12:49 pm
by eurokiwi
Have recently installed CMSMadeSimple and have been hapily entering content for two days now.
Today when accessing my home page I get the following error

Fatal error: Call to a member function getContent() on a non-object in /*/*/public_html/plugins/function.cms_selflink.php on line 283

I am using
Apache version 2.2.15
PHP version 5.2.13
MtSQL 5.0.91-community
CMS 1.9.4.1 "Faanui"

Can anyone tell me why it is suddenly not so simple anymore?

Michael

Re: Fatal error: Call to a member function getContent()

Posted: Wed Apr 13, 2011 1:14 pm
by RonnyK
Michael,

are you using content-types that are not available anymore? Like a page for Guestbook, or Album or News f.e.? If so then it will break as those might not be available in the dropdown, but you could have pages with those in...

Ronny

Re: Fatal error: Call to a member function getContent()

Posted: Wed Apr 13, 2011 3:08 pm
by eurokiwi
To my utter dismay! And I never thought to check this. All my content pages I built over last two days have vanished. There are none. How could this have happened?
Explains error message.

Michael

Re: Fatal error: Call to a member function getContent()

Posted: Thu Apr 14, 2011 8:50 am
by RonnyK
Did you uninstall a module? Check the DB table cms_content and check what content-types are there....

Ronny

Re: Fatal error: Call to a member function getContent()

Posted: Thu Apr 14, 2011 9:12 am
by eurokiwi
RonnyK wrote:Did you uninstall a module? Check the DB table cms_content and check what content-types are there....

Ronny
Hi Ronny.
No I uninstalled nothing but have now totally reinstalled and it remains stable.
Is there an easy backup option or do I just backup the server DB.?
Thanks for your time.
Michael

Re: Fatal error: Call to a member function getContent()

Posted: Thu Apr 14, 2011 9:49 am
by RonnyK
I would use the regular DB backup logic, like phpmyadmin or so...

Ronny

Re: Fatal error: Call to a member function getContent()

Posted: Sun Jun 12, 2011 10:16 pm
by ridelikeaturtle
I've seen this error message before - it is very concerning at first - and simply clearing the cache from your Site Admin->Global Settings->Advanced Setup in CMSMS will solve the problem.

Re: Fatal error: Call to a member function getContent()

Posted: Tue Jun 14, 2011 10:44 pm
by replytomk3
I have seen this error message before as well, and it was because the hosting company moved server paths without telling my customer. See if error message paths are the same as config.php paths.

Re: Fatal error: Call to a member function getContent()

Posted: Tue Jun 21, 2011 10:23 pm
by cowtan
ridelikeaturtle wrote:I've seen this error message before - it is very concerning at first - and simply clearing the cache from your Site Admin->Global Settings->Advanced Setup in CMSMS will solve the problem.
Many thanks for this. I had a very similar message and was expecting many unhappy hours of trying to work out what the problem might be but clearing the cache did the trick.

As well as having the error message on the home page, none of the menus seemed to work either. I'd be interested to know if anyone knows what might be causing it - is it something to do with the way some sites are set-up or is it a bug in cmsms?

Re: Fatal error: Call to a member function getContent()

Posted: Tue Jun 21, 2011 10:33 pm
by replytomk3
Yet another reason config.php paths should be relative to one path, or even not specified at all (with the path automatically determined from the server path).

Re: Fatal error: Call to a member function getContent()

Posted: Wed Jul 13, 2011 1:21 pm
by cowtan
I've now had this problem twice more since the original occurrence. Each time it's been solved by clearing the cache. So far my customer's been quite understanding about it but I do need to find a long-term solution.

If it's something to do with config.php can anyone explain quite how and what a long term solution might be. If it's not to do with config.php does anyone have any idea what it might be?

Gordon

Re: Fatal error: Call to a member function getContent()

Posted: Wed Jul 13, 2011 4:38 pm
by replytomk3
replytomk3 wrote:Yet another reason config.php paths should be relative to one path, or even not specified at all (with the path automatically determined from the server path).
PM me when it happens.

Re: Fatal error: Call to a member function getContent()

Posted: Wed Jul 13, 2011 5:17 pm
by cowtan
OK, thanks. Will do.
replytomk3 wrote:
replytomk3 wrote:Yet another reason config.php paths should be relative to one path, or even not specified at all (with the path automatically determined from the server path).
PM me when it happens.

Re: Fatal error: Call to a member function getContent()

Posted: Mon Aug 01, 2011 10:24 pm
by Felix
I just had the same problem on one of my sites. Should the cache be set to clear on a regular basis?

Re: Fatal error: Call to a member function getContent()

Posted: Mon Aug 15, 2011 10:37 am
by netfied
I have been having the same problem with a few of my sites yeah its time we got a permanent solution.