OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Fatal error: Call to a member function getSettings()...

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

Fatal error: Call to a member function getSettings()...

Postby btcharpied » Sun Jul 10, 2011 12:03 pm

Hello,

I have tried to utilize OCS several times over the last few years for our non-profit academic organization's annual conference. However, each and every time, regardless of the version I attempt, I get this error in the setup:

Fatal error: Call to a member function getSettings() on a non-object in /home1/obtsorg/public_html/ocs/classes/manager/form/schedConfSetup/SchedConfSetupForm.inc.php on line 53


Line 53 in that file is as follows (shown in bold):

/**
* Initialize data from current settings.
*/
function initData() {
$schedConf =& Request::getSchedConf();
$this->_data = $SchedConf->getSettings();
}


I figure after my fourth or fifth try at OCS over a two-year period, it is about time to hit the message boards here for a solution. This is really the only thing standing between me and my organization utilizing this wonderful piece of software (from what I have heard -- looking forward to fixing this and seeing that for myself! :D )

Best,

-BTC
btcharpied
 
Posts: 18
Joined: Sun Jul 10, 2011 11:57 am

Re: Fatal error: Call to a member function getSettings()...

Postby asmecher » Mon Jul 11, 2011 8:43 am

Hi BTC,

The line you quote appears to contain a typo -- $SchedConf should be $schedConf -- though PHP is not often case-sensitive. However, I don't think you're working with the most recent version; I'd suggest downloading the newest version off the website and starting with that. If you encounter an error, check here and post away; we try to respond quickly.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8314
Joined: Wed Aug 10, 2005 12:56 pm

Re: Fatal error: Call to a member function getSettings()...

Postby btcharpied » Mon Jul 11, 2011 9:25 am

Actually, the malfunction was occurring prior to the capital 'S' -- I put that in there just in case something that was or was not case-sensitive was misstated, so I know that isn't the issue.

The version I downloaded and attempted to set up was 2.3.3-1 from the website. Is that not the most up-to-date version? Just so we both know I'm not making a dumb mistake, here is the file name on the .tar that I ran: ocs-2.3.3-1.tar.

I went back and finally rectified the issue by downgrading to 2.1.2-1, an unfortunate downgrade but the setup finally operated as it needed to.

I'd still love any recommendations on how to rectify the issue with 2.3.3-1 though, or if you can point me to a more updated version that I do not see on the 'downloads' section of the site.

Best,

-Brandon
btcharpied
 
Posts: 18
Joined: Sun Jul 10, 2011 11:57 am

Re: Fatal error: Call to a member function getSettings()...

Postby asmecher » Mon Jul 11, 2011 9:28 am

Hi Brandon,

Version 2.3.3-1 is indeed the most recent version. If you get the chance, try it again without the modification and post the exact error message you get; I'll see if I can figure it out.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8314
Joined: Wed Aug 10, 2005 12:56 pm

Re: Fatal error: Call to a member function getSettings()...

Postby btcharpied » Mon Jul 11, 2011 9:36 am

After making the term lowercase:


Fatal error: Call to a member function getSettings() on a non-object in /home1/obtsorg/public_html/ocs/classes/manager/form/schedConfSetup/SchedConfSetupForm.inc.php on line 53



And the code around the error (line in question in bold):


}

/**
* Initialize data from current settings.
*/
function initData() {
$SchedConf =& Request::getSchedConf();
$this->_data = $schedConf->getSettings();
}


NOTE!!!! Just found the error! I don't know what it was like that, but on line 52 the $S was capitalized - which may have been what you were referring to in the prior post, while I was concentrating on line 53 only (I edited the one on line 53 to match the preexisting untouched code on line 52, assuming since the error was on 53, line 52 must have been correct). It turns out that line 52 was incorrect from the get go after I compared it to the working copy from 2.1.2-1.

Any idea why that error would arise every time I tried to install 2.3.3-1? Is this just a simple bug/fix that most others found without posting it? Or is/was my code doing something screwy with it unique to my downloads/uploads/setups? Too odd :?
btcharpied
 
Posts: 18
Joined: Sun Jul 10, 2011 11:57 am

Re: Fatal error: Call to a member function getSettings()...

Postby asmecher » Mon Jul 11, 2011 10:07 am

Hi Brandon,

Not sure -- are you sure that wasn't an accidental modification? Looking at the OCS download package, the "s" in $schedConf is lowercase as it should be.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8314
Joined: Wed Aug 10, 2005 12:56 pm

Re: Fatal error: Call to a member function getSettings()...

Postby btcharpied » Mon Jul 11, 2011 1:11 pm

Still messes up even with the fixed code, this time after progressing to Step 3 (hangs up with a blank white page).

Anyway, I give up and will simply stick with the working 2.1.2-1 copy. I do greatly appreciate your time and assistance though.

Best,

-BTC
btcharpied
 
Posts: 18
Joined: Sun Jul 10, 2011 11:57 am

Re: Fatal error: Call to a member function getSettings()...

Postby asmecher » Mon Jul 11, 2011 1:15 pm

Hi Brandon,

It's definitely worth keeping up to date -- OCS 2.1.2-1 is pretty old. Usually a blank page means a file permission problem; check your server's error log and see if there's a corresponding entry there.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8314
Joined: Wed Aug 10, 2005 12:56 pm

Re: Fatal error: Call to a member function getSettings()...

Postby btcharpied » Mon Jul 11, 2011 1:44 pm

I'll scrap 2.3.3-1 and give it another install.

Best,

-Brandon
btcharpied
 
Posts: 18
Joined: Sun Jul 10, 2011 11:57 am


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests