eZ Community » Forums » eZ Publish 5 Platform » NetgenTagsBundle error field priority...
expandshrink

NetgenTagsBundle error field priority not found

NetgenTagsBundle error field priority not found

Thursday 21 May 2015 1:38:15 pm - 2 replies

Hi there,

I don't know why, but I have a mysql error when i try to create an object in the admin interface.

I have a custom class containing an eztags attribute.

Error message in ezpublish_legacy/log/error.log :

Query error (1054): Unknown column 'priority' in 'field list'. Query: SELECT DISTINCT keyword_id, priority FROM eztags_attribute_link WHERE objectattribute_id = 275 AND objectattribute_version = 1 ORDER BY priority, keyword_id ASC

I've checked in the DB and it's true that there is no field named 'priority'.

I have netgen/tagsbundle : 1.2 and eztags : 1.4

I have two environnement : 1 DEV and 1 PREPROD with the same config and database.

It is working perfectly in DEV but not in PREPROD.

The error message displayed in the browser when i try to add the object is :

 Fatal error: A database transaction in eZ Publish failed.
The current execution was stopped to prevent further problems.
You should contact the System Administrator of this site with the information on this page.
The current transaction ID is TRANSID-cce8b2f07a0b230eb741346e5f1cbf4f and has been logged.
Please include the transaction ID and the current URL when contacting the system administrator.

Thanks for you help. Cheers.

EDIT :

https://github.com/ezsystems/eztags/blob/master/sql/mysql/schema.sql

This url shows that there is a field priority created in the schema.sql, but in my schema.sql, I do not have this field.

I guess i just have to create it, but WHY IS IT WORKING in the DEV environment ?

Thanks anyway. As I'm always saying, asking is findind.

Modified on Thursday 21 May 2015 1:45:35 pm by Task Mikaël

Thursday 21 May 2015 7:44:29 pm

Hi,

'priority' is a new field in 'eztags_attribute_link' table, that can be found on the new eztags version.

I suppose you updated your eztags on dev env but not on your prod env.

Have you launch a composer update on your dev environment?

You can resolve this with this sql query:

ALTER TABLE `eztags_attribute_link` ADD `priority` INT NOT NULL AFTER `object_id`;

Friday 22 May 2015 11:35:23 am

Yes, both configs were up to date ! I've fixed the problem by adding the field in the DB.Anyway, not a big problem. I'll test more before merging into PREPROD.Thanks, Cheers.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from