Problem/Motivation

I've tried to update from beta11 to 1.2 version and get next error

...
Performing social_core_update_8020                                          [ok]
Unable to delete a field (langcode in profile entity) with data that     [error]
cannot be purged.
Performing social_core_update_8021                                          [ok]
...

Proposed resolution

Found that this problem related to Profile module issue here https://www.drupal.org/node/2634230
It was fixed with `profile_update_8001()` but OS updated runs before Profile updates.
So updates order should be changed a bit.
Attaching patch which makes OS updates dependent from Profile update.

Comments

tarasich created an issue. See original summary.

kingdutch’s picture

StatusFileSize
new685 bytes
new1.27 KB

The patch in the opening post missed the return statement for the dependencies array and had the hook in the .module file while the documentation ( https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension... ) specifies it should be in the .install file.

Attached patch fixes both issues. Interdiff is provided if you already applied the original patch.

Relevant pull request: https://github.com/goalgorilla/open_social/pull/513

How to test:
Update from RC5 or earlier to 1.3 or from beta11 to 1.2. The error is caused by update 8020 which seems to have been introduced in RC7. Upgrades between other versions that touch this update hook may also suffer the error without the patch applied but these have not (yet) been observed.

robertragas’s picture

Tested both patches, and can confirm that the second patch is working as it should.

robertragas’s picture

Status: Needs review » Reviewed & tested by the community
jaapjan’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everyone, merged the pull request.

Status: Fixed » Closed (fixed)

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