Fatal error: Call to a member function getContent()

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
eurokiwi
New Member
New Member
Posts: 5
Joined: Wed Apr 13, 2011 12:22 pm

Fatal error: Call to a member function getContent()

Post 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
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

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

Post 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
eurokiwi
New Member
New Member
Posts: 5
Joined: Wed Apr 13, 2011 12:22 pm

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

Post 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
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

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

Post by RonnyK »

Did you uninstall a module? Check the DB table cms_content and check what content-types are there....

Ronny
eurokiwi
New Member
New Member
Posts: 5
Joined: Wed Apr 13, 2011 12:22 pm

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

Post 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
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

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

Post by RonnyK »

I would use the regular DB backup logic, like phpmyadmin or so...

Ronny
ridelikeaturtle
Forum Members
Forum Members
Posts: 103
Joined: Thu May 06, 2010 9:22 pm

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

Post 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.
replytomk3

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

Post 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.
cowtan
Forum Members
Forum Members
Posts: 70
Joined: Mon Jan 19, 2009 5:04 pm

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

Post 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?
replytomk3

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

Post 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).
cowtan
Forum Members
Forum Members
Posts: 70
Joined: Mon Jan 19, 2009 5:04 pm

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

Post 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
replytomk3

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

Post 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.
cowtan
Forum Members
Forum Members
Posts: 70
Joined: Mon Jan 19, 2009 5:04 pm

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

Post 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.
Felix
Forum Members
Forum Members
Posts: 54
Joined: Wed Oct 31, 2007 11:32 pm
Location: Melbourne, Australia

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

Post by Felix »

I just had the same problem on one of my sites. Should the cache be set to clear on a regular basis?
netfied

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

Post by netfied »

I have been having the same problem with a few of my sites yeah its time we got a permanent solution.
Locked

Return to “CMSMS Core”