DB Error: Unknown column 'Array' in 'field list'

Hi,

Before of update my version 2.4.8.3 for 3.1.1.4, show me this message in the login.
DB Error: Unknown column ‘Array’ in ‘field list’. but before of update no view

Hi @franciscosatiro,

Can you post the full error message? You may need to turn on “show_stacktrace” in config.inc.php to get more detail.

Best,
Amanda Stevens
Public Knowledge Project Team

DB Error: Unknown column ‘Array’ in ‘field list’

Stack Trace:

File: /srv/.www/ojs/lib/pkp/classes/user/PKPUserDAO.inc.php line 464
Function: DAO->update(“UPDATE users SET username = ?, password = ?, salut…”, Array(23))

File: /srv/.www/ojs/lib/pkp/classes/security/Validation.inc.php line 137
Function: PKPUserDAO->updateObject(Object(User))

File: /srv/.www/ojs/lib/pkp/classes/security/Validation.inc.php line 71
Function: Validation::registerUserSession(Object(User), Null, True)

File: /srv/.www/ojs/lib/pkp/pages/login/LoginHandler.inc.php line 99
Function: Validation::login(“removed”, “removed”, Null, True)

File: (unknown) line (unknown)
Function: LoginHandler->signIn(Array(0), Object(Request))

File: /srv/.www/ojs/lib/pkp/classes/core/PKPRouter.inc.php line 390
Function: call_user_func(Array(2), Array(0), Object(Request))

File: /srv/.www/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php line 232
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False)

File: /srv/.www/ojs/lib/pkp/classes/core/Dispatcher.inc.php line 134
Function: PKPPageRouter->route(Object(Request))

File: /srv/.www/ojs/lib/pkp/classes/core/PKPApplication.inc.php line 247
Function: Dispatcher->dispatch(Object(Request))

File: /srv/.www/ojs/index.php line 68
Function: PKPApplication->execute()

Hi @franciscosatiro,

Beware of posting stack traces without reviewing their contents first – your post contained your password. I’ve removed it now, but please change your password immediately.

Can you describe the upgrade process you’re following? Are there any modifications to your OJS 3.x code?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

My password has changed, as for the process I used the one described in the official pkp documentation.
There is no modification to my installation.

Regards,

Hi @franciscosatiro,

There are several processes described… Are you installing from the .tar.gz or using git?

Regards,
Alec Smecher
Public Knowledge Project Team

I instaled from .tar.gz based on this tutorial:
Tiltle: Upgrading to OJS 3

Hi @franciscosatiro,

Hmm, I can only think that this must be a data problem (e.g. something unexpected in your database).

I’d suggest going through the variables listed in lib/pkp/classes/user/PKPUserDAO.inc.php in the updateObject function:

                        array(
                                $user->getUsername(),
                                $user->getPassword(),
                                $user->getSalutation(),
                                $user->getFirstName(),
                                $user->getMiddleName(),
                                $user->getInitials(),
                                $user->getLastName(),
                                $user->getSuffix(),
                                $user->getEmail(),
                                $user->getUrl(),
                                $user->getPhone(),
                                $user->getMailingAddress(),
                                $user->getBillingAddress(),
                                $user->getCountry(),
                                join(':', $user->getLocales()),
                                $user->getMustChangePassword() ? 1 : 0,
                                $user->getDisabled() ? 1 : 0,
                                $user->getDisabledReason(),
                                $user->getAuthId()=='' ? null : (int) $user->getAuthId(),
                                $user->getAuthStr(),
                                (int) $user->getInlineHelp(),
                                $user->getGossip(),
                                (int) $user->getId(),
                        )

One of these is an array where it should be a string. I’d suggest using error_log or print_r statements to determine which.

Regards,
Alec Smecher
Public Knowledge Project Team

I have the same problem on my testing server. I found that the problem is Gossip parameter. $user->getGossip() returns an Array.
I will keep digging where is the problem :slight_smile:

EDIT: I found where is the problem. It’s because of “gossip” setting in the table user_settings. It should be deleted after upgrade.

Gossip should be just in the table user and deleted in user_settings.

I used this query to found all rows and then deleted them :slight_smile:

SELECT * FROM user_settings us WHERE us.setting_name="gossip";

Or use just:

DELETE FROM user_settings WHERE setting_name="gossip";

Hope this will be helpful.

Thank you for the tip, where could be a problem.
Best Regards,
Radek