Hi,

picture module

7200 - Update from 7.x-1.x.

I get the following message after upgrading and when i run update.php:

DatabaseSchemaObjectExistsException: Cannot add field picture_mapping.label: field already exists.

Any idea how to fix this issue, i really would like to stay updated with this module

Comments

ebenfarnworth’s picture

Same problem I think:

Failed: DatabaseSchemaObjectExistsException: Cannot add field picture_mapping.label: field already exists. in DatabaseSchema_mysql->addField() (line 328 of /var/www/vhosts/site-name/httpdocs/includes/database/mysql/schema.inc).

Anonymous’s picture

Ebenfarnworth, good to know I am not the only one... I for now stick at 1.3 of the module, since the upgrade doesn't go smoothly, too bad.. we always like to stay up to date...

andres_de’s picture

Similar problem(s):

After updating from 7.x-1.2 to 7.x-1.3:
after running update.php
"Recoverable fatal error: Argument 1 passed to picture_get_mapping_breakpoints() must be an instance of PictureMapping, boolean given, called in .../sites/all/modules/picture/picture.module on line 367 and defined in picture_get_mapping_breakpoints() (Zeile 1057 von .../sites/all/modules/picture/picture.module)."

Then I tried to upgrading from 7.x-1.3 to 7.x-2.0:
same result after running update.php:
"Recoverable fatal error: Argument 1 passed to picture_get_mapping_breakpoints() must be an instance of PictureMapping, boolean given, called in .../sites/all/modules/picture/picture.module on line 367 and defined in picture_get_mapping_breakpoints() (Zeile 1057 von .../sites/all/modules/picture/picture.module)."

I rolled back via drush to 7.x-1.2
The error disappeared and the module seem to work.

greetings

jstoller’s picture

@andres_de, I had the same error, but it seems different than what's reported in this issue, so I created a new issue: #2274661: Fatal error: Argument 1 passed to picture_get_mapping_breakpoints() must be an instance of PictureMapping.

jstoller’s picture

@Reinierv and ebenfarnworth, I wonder if this is related to #2274561: Picture 2.0 update fatal error: Class 'PictureMapping' not found. In testing the error in that issue, I also got this error, but not immediately. When I first tried updating Picture, picture_update_7200 failed with the "Class 'PictureMapping' not found" error. Then, just for fun, I rebuilt the registry and tried running drush updb again. This time I got the error

"Cannot add field picture_mapping.label: field already exists."
curiosity26’s picture

StatusFileSize
new399 bytes

Here's the fix guys. Also, if you are using the Picture formatting in views, the upgrade will break any pages that view exists on. You have to go back into your view and remap the picture formatter to the view.

jstoller’s picture

Status: Active » Reviewed & tested by the community

The patch in #6 solved #2274561: Picture 2.0 update fatal error: Class 'PictureMapping' not found, which in turn solved this issue. Marking RTBC.

  • Commit f59e5f7 on 7.x-2.x authored by curiosity26, committed by attiks:
    Issue #2273249 by curiosity26 | Reinierv: Fixed Upgrade issue 1.3 to 2.0...
attiks’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Status: Reviewed & tested by the community » Fixed

Thanks

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

markbannister’s picture

upgraded from 7.x-1.x-dev (from Drupal Commons had 5 patches) to 7.x.2.9 and getting this error.
Patch from #6 was already applied.

artem.vilkov’s picture

Hi all,
I have the problem with update this module from 7.x-1.5 to 7.x-2.10.

attiks’s picture

Committed

trak-dev’s picture

I have the same problem with update this module from 7.x- to 7.x-2. Have tried the recent Dev version also.

error:

"Failed: DatabaseSchemaObjectExistsException: Cannot add field picture_mapping.label: field already exists. in DatabaseSchema_mysql->addField() (line 328 of N:\xampp\htdocs\##-com\includes\database\mysql\schema.inc)."