OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Cannot use a scalar value as an array

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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Re: Cannot use a scalar value as an array

Postby asmecher » Tue Oct 29, 2013 4:36 pm

Hi sandramack,

The problem is likely an empty locale column in a case where OJS is expecting a value there, or a locale column with a value where OJS was expecting an empty column.

To track this down, try running the following query:
Code: Select all
SELECT DISTINCT s1.setting_name FROM journal_settings s1, journal_settings s2 WHERE s1.setting_name = s2.setting_name AND s1.locale = '' AND s2.locale <> '';
This will tell you what setting_name value in journal_settings is mismatched, i.e. has some values with a locale column set, others with it empty. If you post back what results you get, I can recommend how to resolve it.

FYI, this is sometimes an indication that an upgrade has previously failed -- i.e. that the upgrade script hit an error, leaving the database in an inconsistent state. If that's the case, and you've continued to use the install, you may run into other data problems.

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

Re: Cannot use a scalar value as an array

Postby partove » Sat Jan 04, 2014 11:59 pm

Hi Alec
result of this code is metaCitations. what do we do?
partove
 
Posts: 4
Joined: Mon Dec 30, 2013 2:36 am

Re: Cannot use a scalar value as an array

Postby jamilj » Tue Jan 28, 2014 10:19 am

Hi Alex,

I ran that SQL command and got "metaCitations", like the other user. When I searched journal settings, I got the following result.

Image

Should I just add "en_US" (locale) to the "bool" setting_type?

My install crashed because I did not see the patch concerning the infinite loop problem with the installation script, so I assume that is the source of my problem. Do you suggest reinstalling in this case?
jamilj
 
Posts: 45
Joined: Sun Aug 25, 2013 10:36 pm

Re: Cannot use a scalar value as an array

Postby asmecher » Tue Jan 28, 2014 10:30 am

Hi all,

I would suggest:
  • Delete both metaCitations entries from your DB
  • Flush the OJS data cache
  • Go to Journal Setup step 3 and enable or disable the Citation Assistant as per your needs
  • Save the form
This should solve the problem. It's cosmetic.

Jamil, the infinite loop problem occurs on some installations during upgrade; if your installation was affected, you would know because the upgrade would never have completed. If your upgrade completed, you're fine to continue.

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

Re: Cannot use a scalar value as an array

Postby jamilj » Tue Jan 28, 2014 2:42 pm

Dear Alec (sorry for calling you "Alex" before),

That fixed the error, thank you. Also, you are correct, I did reinstall after implementing the patch and the process went smoothly. I just thought this could have happened when the first attempt stalled out.

Thanks again.
jamilj
 
Posts: 45
Joined: Sun Aug 25, 2013 10:36 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests