DB Error: Unknown column 'context_id' in 'on clause'

I am upgrading from PKP 2.4 to 3.0.2 on Ubuntu, MySQL 5.5.
I followed the full package procedure. The upgrade command completed with no message.
When I access the website, I get the following screen:
DB Error: Unknown column ‘context_id’ in ‘on clause’

Stack Trace:

File: /var/www/html/journal/lib/pkp/classes/site/VersionDAO.inc.php line 238
Function: DAO->retrieve(“SELECT v.* FROM versions v LEFT JOIN plugin_settings ps ON …”, Array(1), False)

File: /var/www/html/journal/lib/pkp/classes/core/PKPApplication.inc.php line 301
Function: VersionDAO->getCurrentProducts(Array(1))

File: /var/www/html/journal/lib/pkp/classes/plugins/PluginRegistry.inc.php line 103
Function: PKPApplication->getEnabledProducts(“plugins.generic”, Null)

File: /var/www/html/journal/lib/pkp/classes/core/Dispatcher.inc.php line 132
Function: PluginRegistry::loadCategory(“generic”, True)

File: /var/www/html/journal/lib/pkp/classes/core/PKPApplication.inc.php line 227
Function: Dispatcher->dispatch(Object(Request))

File: /var/www/html/journal/index.php line 68
Function: PKPApplication->execute()

After the failure, I upgraded to MySQL 5.7, but with the same result.

It seems somehow related with the plug-ins.
We had installed very few plugins (e.g., Crossref). But, since some time, on the production server, the System plugin page cannot be loaded. So there could be an issue there.

Hi @Francesco,

If the upgrade command completed with no message, it likely wasn’t successful. After the upgrade completes you should receive a clear confirmation message that the upgrade succeeded. I would suggest loading your database and files directory from backup and trying the upgrade again; afterwards, check your PHP error log to see if anything is indicated there.

Regards,
Alec Smecher
Public Knowledge Project Team

It was a problem of permissions.
Using the web procedure, the message told that the upgrade failure was to access credentials.
So, we set CHMOD 777, and the migration completed successfully.

Thank you for your support!

Hi @Francesco,

Just a heads-up that 777 permissions are never safe to use in practice, though they can be useful in debugging. See this FAQ entry for some discussion of permissions.

Regards,
Alec Smecher
Public Knowledge Project Team

Sure, it was a temporary step. Thank you!

I had the same problem the better way to give permission is

root@ubuntu16046:/var/www/html# chown -R www-data:www-data ojs-3.1.2-1/

Dung.