eZ Community » Forums » Install & configuration » Error-causing difference in 5.0->5.2...
expandshrink

Error-causing difference in 5.0->5.2 upgraded DB vs 5.2 new install

Error-causing difference in 5.0->5.2 upgraded DB vs 5.2 new install

Thursday 21 November 2013 1:22:25 pm - 3 replies

The table ezimagefile has two indexes in a 5.2 fresh install:

ezimagefile_coid
ezimagefile_file

The same table, when upgrading to 5.2 gets an extra unique index from the very last line of the 5.1 to 5.2 upgrade script (in both mysql and postgresql):

CREATE UNIQUE INDEX ezimagefile_co_attr_id_filepath ON ezimagefile USING ....

This unique index gives a fatal error whenever one edits an item with an image. The new version of the item gets a fresh copy of the same image file inserted into ezimagefile, which is not allowed.

Perhaps ezimagefile should have a new field version as part of the unique index?

Workaround: delete this unique index.

Future consequences: ?

Modified on Thursday 21 November 2013 1:23:50 pm by Finn Espen Gundersen

Saturday 23 November 2013 10:37:01 am

and I do a query with a Criterion\ParentLocationId of Domestic News, how do I then grab and link to the Location of the article under Domestic new? As far as I can see the Content valueObject that is returned only has a mainLocationId attribute which would point to the location under Sports... The only way I could think of accomplish this (which is very tedious) is to fetch all the locations of the Article, loop through and compare the parent id with the id of Domestic News. Is there a better way?

Monday 25 November 2013 10:07:49 pm

Hmmm that's odd. The bug was here, but it was fixed a couple weeks ago.

And you get this error on a 5.2 ? The enterprise version ? Could you please copy and paste (or gist) your upgrade file ? An d if it is an enterprise version, please be sure you post a bug request to support, we'll take care of it.

About your API question, this does ring a bell... I'll check in the team. Your suggestion is nonetheless valid. A twig function with the location service would make it easy.

Tuesday 26 November 2013 12:20:18 pm

@Alice: note that this very same issue did and does exist in eZ Publish legacy. It was kind of implemented in eZ Find, but not in the kernel, as far as I can remember.

Could you show me the code you're using to do this ? I have a couple ideas, but they'd make more sense with your code.

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from