Upgrade issue - DB Error: Unknown column 'a.type' in 'field list'

After upgrading to 2.4.8.1, we get error message about a.type and acting_as is unknown columns. I’ve run the upgrade.php upgrade and verified that code is same version as database…So far only test environment is affected and don’t do the upgrade in production until solved the issue in test environment.

DB Error: Unknown column ‘a.type’ in ‘field list’

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

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

I don’t think there should be a “acting_as” field in 2.4.8.1, so this will likely be either a failed code upgrade, or an incompatible plugin.

Changed it to on, but don’t see any more details in web page. Something more needed to make it take effect?
It’s a Windows server installation if it matter.

You’ll find the details of the error in the webserver’s error log. You can ask OJS to output the error details to the screen by turning on “display_errors” in config.inc.php.

error code in IIS is success. Only thing I saw in httperr log was a 503-error when stopped the application pool.
I also changed display_errors=on, but no effect.

Ok, let’s approach this differently.

What version of OJS were you using previously?
How did you upgrade?
What URLs exhibit the “DB Error” messages?

I need to verify the previous version when I get a login to production database when mysql admin collegue is back in office.
Copied the new downloaded files and run the upgrade.php to get DB uptodate.
The start page /ojs/index.php is giving the error.

Current version in production is 2.3.8.0

After today, I’ll be away for 1 week.

In version 2.3.8, the “acting_as” field was part of the Session. This indicates that you have some 2.3.8 code mixed with your 2.4.8.1 code.

I’d recommend making a fresh upgrade in your test environment, using the “Full Package” upgrade process for the filesystem changes:

The issue has been solved. The main reason was that the package had been extracted to wrong file area (web server’s wwwroot instead of virtual directory) and wasn’t aware of the splitted file areas.

Please resolve the issue.
Error message after upgrading to 3.0.1

DB Error: Unknown column ‘context_id’ in ‘on clause’

Please resolve this error
(mysql): SELECT * FROM sessions WHERE session_id = ‘d82pn52b1vb8niogvdpdtihtp3’
(mysql): SELECT * FROM site
(mysql): SET time_zone = ‘+0:00’
(mysql): SELECT v.* FROM versions v LEFT JOIN plugin_settings ps ON lower(v.product_class_name) = ps.plugin_name AND ps.setting_name = ‘enabled’ AND (context_id = 0 OR v.sitewide = 1) WHERE v.current = 1 AND (ps.setting_value = ‘1’ OR v.lazy_load <> 1)
1054: Unknown column ‘context_id’ in ‘on clause’
ADOConnection._Execute(SELECT v.* FROM versions v LEFT JOIN plugin_settings ps ON lower(v.product_class_name) = ps.plugin_name AND ps.settin…) % line 1032, file: adodb.inc.php
ADOConnection.Execute(SELECT v.* FROM versions v LEFT JOIN plugin_settings ps ON lower(v.product_class_name) = ps.plugin_name AND ps.settin…, Array[1]) % line 99, file: DAO.inc.php
DAO.retrieve(SELECT v.* FROM versions v LEFT JOIN plugin_settings ps ON lower(v.product_class_name) = ps.plugin_name AND ps.settin…, Array[1], false) % line 238, file: VersionDAO.inc.php
VersionDAO.getCurrentProducts(Array[1]) % line 301, file: PKPApplication.inc.php
PKPApplication.getEnabledProducts(plugins.generic, null) % line 103, file: PluginRegistry.inc.php
DB Error: Unknown column ‘context_id’ in ‘on clause’

(mysql): UPDATE sessions SET user_id = NULL, ip_address = ‘47.29.68.104’, user_agent = ‘Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36’, created = 1489406231, last_used = 1489409582, remember = 0, data = ‘’, domain = ‘www.pen2print.org’ WHERE session_id = ‘d82pn52b1vb8niogvdpdtihtp3’

Hi @snsharma,

I’ve responded to your post on this other thread. Please don’t double-post – it clutters the forum.

Regards,
Alec Smecher
Public Knowledge Project Team