OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Error updating journal config

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

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

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

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.

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 OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Error updating journal config

Postby gustavotonini » Tue Apr 30, 2013 11:29 am

I'm getting the following error updating a journal configuration 1 (http://periodicos.ufsc.br/index.php/bio ... er/setup/1).
Any idea?


[Tue Apr 30 15:20:52 2013] [error] [client 150.162.237.38] ojs2 has produced an error\n Message: WARNING: Cannot use a scalar value as an array\n In file: /work/periodicos/public_html/lib/pkp/classes/core/DataObject.inc.php\n At line: 121\n Stacktrace: \n File: /work/periodicos/public_html/lib/pkp/classes/core/DataObject.inc.php line 121\n Function: PKPApplication->errorHandler(2, "Cannot use a scalar value as an array", "/work/periodicos/public_html/lib/pkp/classes/core/DataObject.inc.php", 121, Array(3))\n File: /work/periodicos/public_html/lib/pkp/classes/db/DAO.inc.php line 511\n Function: DataObject->setData("filterSection", 0, "pt_BR")\n File: /work/periodicos/public_html/lib/pkp/classes/user/PKPUserDAO.inc.php line 139\n Function: DAO->getDataObjectSettings("user_settings", "user_id", "18861", Object(User))\n File: /work/periodicos/public_html/lib/pkp/classes/user/PKPUserDAO.inc.php line 45\n Function: PKPUserDAO->_returnUserFromRowWithData(Array(25))\n File: /work/periodicos/public_html/lib/pkp/classes/session/Session.inc.php line 92\n Function: PKPUserDAO->getUser("18861")\n File: /work/periodicos/public_html/lib/pkp/classes/session/SessionDAO.inc.php line 39\n Function: Session->setUserId("18861")\n File: /work/periodicos/public_html/lib/pkp/classes/session/SessionManager.inc.php line 153\n Function: SessionDAO->getSession("5k29bh3169f1u70rqhd1o0bkr4")\n File: (unknown) line (unknown)\n Function: SessionManager->read("5k29bh3169f1u70rqhd1o0bkr4")\n File: /work/periodicos/public_html/lib/pkp/classes/session/SessionManager.inc.php line 60\n Function: session_start()\n File: /work/periodicos/public_html/lib/pkp/classes/session/SessionManager.inc.php line 114\n Function: SessionManager->SessionManager(Object(SessionDAO), Object(Request))\n File: /work/periodicos/public_html/classes/i18n/AppLocale.inc.php line 80\n Function: SessionManager->getManager()\n File: /work/periodicos/public_html/lib/pkp/classes/i18n/PKPLocale.inc.php line 104\n Function: AppLocale->getLocale()\n File: /work/periodicos/public_html/lib/pkp/classes/core/Dispatcher.inc.php line 126\n Function: PKPLocale->initialize()\n File: /work/periodicos/public_html/lib/pkp/classes/core/PKPApplication.inc.php line 180\n Function: Dispatcher->dispatch(Object(Request))\n File: /work/periodicos/public_html/index.php line 65\n Function: PKPApplication->execute()\n Server info:\n OS: Linux\n PHP Version: 5.2.17\n Apache Version: Apache/2.2.13 (Linux/SUSE)\n DB Driver: mysql\n DB server version: 5.5.9-log, referer: http://www.periodicos.ufsc.br/index.php ... ewer/28625
gustavotonini
 
Posts: 26
Joined: Wed Mar 20, 2013 9:44 am

Re: Error updating journal config

Postby asmecher » Tue Apr 30, 2013 12:13 pm

Hi gustavotonini,

This is due to an inconsistency in your database; it sounds like there is a setting_name in the user_settings table for which there is a mixture of localized (locale <> '') and non-localized (locale = '') content. It's a warning that you should be able to ignore, but if you'd like to correct it, look for values in your user_settings table as above.

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

Re: Error updating journal config

Postby gustavotonini » Wed May 08, 2013 9:25 am

Yes. The setting "filter_editor" caused the problem. I've removed all these settings from my user. It works some times and then duplicate settings appear again.
Is there any way to avoid this behavior?
gustavotonini
 
Posts: 26
Joined: Wed Mar 20, 2013 9:44 am

Re: Error updating journal config

Postby asmecher » Wed May 08, 2013 4:17 pm

Hi gustavotonini,

Strange, looking at the OJS 2.3.8 source code I don't see any inconsistency around that setting. It should never be localized (i.e. the "locale" field in the DB should always be empty for that setting). Are you sure there are no related modifications in your installation? When you remove that setting from the database, do you remove it in all cases or only certain data?

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

Re: Error updating journal config

Postby gustavotonini » Thu May 09, 2013 9:23 am

I did: delete from user_settings where setting_name='filterEditor' and locale <>''
Let's see what happen.
I'll report if the inconsistent records appear again.
Thanks.
gustavotonini
 
Posts: 26
Joined: Wed Mar 20, 2013 9:44 am

Re: Error updating journal config

Postby gustavotonini » Tue Jun 04, 2013 11:10 am

We're trying to change settings 1.2.
We save the settings and nothing change. No error is printed on Apache error.log
gustavotonini
 
Posts: 26
Joined: Wed Mar 20, 2013 9:44 am

Re: Error updating journal config

Postby asmecher » Tue Jun 04, 2013 11:14 am

Hi gustavotonini,

That's probably a file permissions problem in your cache/ directory.

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

Re: Error updating journal config

Postby gustavotonini » Wed Jun 05, 2013 6:09 am

I've changed the permissions to 777 and the problem persists.
Will the upgrade to 2.4.2 fix the problem?
gustavotonini
 
Posts: 26
Joined: Wed Mar 20, 2013 9:44 am

Re: Error updating journal config

Postby asmecher » Wed Jun 05, 2013 9:30 am

Hi gustavotonini,

Be careful; 777 is never safe to use. Are you changing the permissions on the files in cache/, or just the directory itself?

An upgrade to 2.4.2 won't affect this; it treats cache files the same way.

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

Re: Error updating journal config

Postby gustavotonini » Wed Jun 05, 2013 10:29 am

Both: chmod 777 -R cache/
gustavotonini
 
Posts: 26
Joined: Wed Mar 20, 2013 9:44 am

Re: Error updating journal config

Postby asmecher » Wed Jun 05, 2013 10:34 am

Hi gustavotonini,

What settings are you trying to change? Are only some settings not changing when you save the settings page?

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

Re: Error updating journal config

Postby gustavotonini » Wed Jun 05, 2013 1:27 pm

In Setting 1.2 we cant change "Title" and "Affiliation".
Other fields are OK.
gustavotonini
 
Posts: 26
Joined: Wed Mar 20, 2013 9:44 am

Re: Error updating journal config

Postby asmecher » Wed Jun 05, 2013 1:38 pm

Hi gustavotonini,

I suspect you have the same database inconsistency as above, this time in the journal_settings table. The entries with setting_name = 'contactTitle' and 'contactAffiliation' should have the locale column set, and if the column is empty, you can expect this kind of problem.

I wonder if your installation wasn't correctly upgraded -- if so, you're likely to encounter this kind of problem in other places too.

Once you've changed something in the journal_settings table, you'll need to flush your data cache before the change will take effect.

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

Re: Error updating journal config

Postby gustavotonini » Fri Jun 07, 2013 6:25 am

It worked. Thank you very much, Alec.
gustavotonini
 
Posts: 26
Joined: Wed Mar 20, 2013 9:44 am

Re: Error updating journal config

Postby makouvlei » Mon Oct 28, 2013 11:52 am

Hi Alec, experiencing a similar situation after our upgrade from 2.3.7 to 2.4.2.

If I create a new Journal, once I complete /path/manager/setupSaved/3 OJS stacktrace returns "WARNING: Cannot use a scalar value as an array" referring to \classes\journal\JournalSettingsDAO.inc.php and then the error repeats at every subsequent save of the setup pages.

I noticed at the point where page 3 of Setup is saved, I end up with a duplicate record for journalsetting 'metaCitations' which has a locale value and a setting_type 'string', whereas other record (before the duplication) has no locale and setting_type 'bool'. It is only a WARNING so I am able to continue with the setup but this warning appears regularly while working with the Journal.

Any suggestions?

Regards
Jannie van Tonder
makouvlei
 
Posts: 16
Joined: Wed Nov 17, 2010 2:56 am

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 6 guests