• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Failed to install or upgrade the extension 'WordPress Toolkit' for "no such column: ownerId"

Bitpalast

Plesk addicted!
Plesk Guru
Onyx 17.0 on CentOS 7.4
Excerpt from autoinstaller log of last night:
Code:
...
ERROR: Failed to install or upgrade the extension 'WordPress Toolkit' (package: wp-toolkit):
[2018-02-13 03:39:21] ERR [extension/wp-toolkit] Execution of /usr/local/psa/admin/plib/modules/wp-toolkit/scripts/post-install.php failed with exit code 1 and the output:
[2018-02-13 03:39:21] ERR [extension/wp-toolkit] SQLSTATE[HY000]: General error: 1 no such column: ownerId
Execution of /usr/local/psa/admin/plib/modules/wp-toolkit/scripts/post-install.php failed with exit code 1 and the output:
[2018-02-13 03:39:21] ERR [extension/wp-toolkit] SQLSTATE[HY000]: General error: 1 no such column: ownerId

What to do to solve this?
 
Hello! Could you please clarify which version of WordPres Toolkit already installed and which version do you want to install?
 
Current version installed is 2.5.1, upgrade procedure is an auto-upgrade in the nightly maintenance window. I am not sure what version it trys to install, as it is not mentioned in the log.
 
Hello Peter,

Wordpress Toolkit 2.5.1 is the current version based on WordPress Toolkit - Plesk Extensions
It seems some of the previous updates of Wordpress Toolkit did not completed successfully and did not apply changes on Wordpress Toolkit sqlite database. Could you please share the version and the schema of this database?
Code:
# sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3
sqlite> select * from version;
sqlite> .schema
 
Looks like an issue occurs during previous upgrade for some reason and database of WordPress Toolkit is in inconsistent state right now (upgrade of database structure is the latest step of module upgrade, so it does not block it). Such error for sure will occur during all future upgrades. It will affect functionality of Sets of WordPress themes and plugins. Do you use it now?
 
Code:
sqlite> select * from version;
1|/usr/local/psa/admin/plib/modules/wp-toolkit/library/Db/Migrations//2017112404000

Code:
sqlite> .schema
CREATE TABLE `version` (  `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,  `dbVersion` TEXT NOT NULL);
CREATE TABLE `Instances` (  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,  `domainId` int(10) NOT NULL,  `path` varchar(255),  `isIgnored` INTEGER NOT NULL DEFAULT 0,  `apsInstanceId` int(11));
CREATE TABLE `InstanceProperties` (  `instanceId` INTEGER NOT NULL REFERENCES Instances(id) ON DELETE CASCADE,  `name` varchar(255),  `value` TEXT,  PRIMARY KEY (`instanceId`, `name`));
CREATE TABLE `InstancesDomains` (  `instanceId` INTEGER NOT NULL REFERENCES Instances(id) ON DELETE CASCADE,  `domainId` int(10) NOT NULL,  PRIMARY KEY (`instanceId`, `domainId`));
CREATE TABLE `SetsPlugins` (  `setId` INTEGER NOT NULL REFERENCES Sets(id) ON DELETE CASCADE,  `pluginId` INTEGER NOT NULL REFERENCES Plugins(id) ON DELETE CASCADE,  PRIMARY KEY (`setId`, `pluginId`));
CREATE TABLE `SetsThemes` (  `setId` INTEGER NOT NULL REFERENCES Sets(id) ON DELETE CASCADE,  `themeId` INTEGER NOT NULL REFERENCES Themes(id) ON DELETE CASCADE,  PRIMARY KEY (`setId`, `themeId`));
CREATE TABLE `PluginVersions` (  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,  `pluginId` INTEGER NOT NULL REFERENCES Plugins(id) ON DELETE CASCADE,  `version` varchar(255) NOT NULL);
CREATE TABLE `ThemeVersions` (  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,  `themeId` INTEGER NOT NULL REFERENCES Themes(id) ON DELETE CASCADE,  `version` varchar(255) NOT NULL);
CREATE TABLE `PluginsInstances` (  `pluginVersionId` INTEGER NOT NULL REFERENCES PluginVersions(id) ON DELETE CASCADE,  `instanceId` INTEGER NOT NULL REFERENCES Instances(id) ON DELETE CASCADE,  PRIMARY KEY (`pluginVersionId`, `instanceId`));
CREATE TABLE `ThemesInstances` (  `themeVersionId` INTEGER NOT NULL REFERENCES ThemeVersions(id) ON DELETE CASCADE,  `instanceId` INTEGER NOT NULL REFERENCES Instances(id) ON DELETE CASCADE,  PRIMARY KEY (`themeVersionId`, `instanceId`));
CREATE TABLE `Sets` (  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,  `ownerGuid` varchar(255) NOT NULL,  `name` varchar(255));
CREATE TABLE `Plugins` (  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,  `name` varchar(255),  `title` varchar(255),  `sourceId` INTEGER NOT NULL DEFAULT 1,  `ownerGuid` varchar(255) NOT NULL);
CREATE TABLE `Themes` (  `id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,  `name` varchar(255),  `title` varchar(255),  `sourceId` INTEGER NOT NULL DEFAULT 1,  `ownerGuid` varchar(255) NOT NULL);

If I'd only know what "Sets" are in this context ... I do not know whether they are used, but the Toolkit is in heavy use. Hundreds of subscriptions on this machine that are using it.
 
Database structure looks good now. Legacy "ownerId" columns in Plugins and Themes tables replaced by "ownerGuid" by one of latest upgrade steps, as expected. But version of database structure is wrong. It should be a timestamp, like this:

sqlite> select * from version;
1|2017121502000

Thats why we try to apply the latest upgrade step once again. We will try to investigate how it could happens. At now, to fix an issue, you can update value stored in 'version' table of WordPress Toolkit database: replace '/usr/local/psa/admin/plib/modules/wp-toolkit/library/Db/Migrations//2017112404000' by '2017121502000':

sqlite> update version set dbVersion = '2017121502000';

Future upgrades will back to normal after that.
 
Code:
sqlite> select * from version;
1|/usr/local/psa/admin/plib/modules/wp-toolkit/library/Db/Migrations//2017112404000
sqlite> update version set dbVersion = '2017121502000';
sqlite> select * from version;
1|2017121502000

O.k., thank you very much!
 
Back
Top