Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
We have to make sure that the dropzonejs_eb_widget_update_8201 update hook runs after media_entity_update_8201
Proposed resolution
Implement hook_update_dependencies
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#19 | 2915745-19.patch | 694 bytes | miax |
#14 | 2915745-14.patch | 768 bytes | chr.fritsch |
#10 | make_sure-2915745-9.patch | 1.02 KB | woprrr |
#2 | make_sure-2915745-2.patch | 1.78 KB | chr.fritsch |
Comments
Comment #2
chr.fritschAfter discussion with @mtodor, we decided to move the changes from object level to config level. Then we don't need to introduce a hook_update_dependencies
Comment #4
chr.fritschPushed to 8.x-2.x
Comment #5
KevinVanRansbeeck CreditAttribution: KevinVanRansbeeck commentedAre you sure it's fixed on 2.x-dev?
When I used alpha1 with this patch - errors were gone.
Now I removed the patch and use 2.x-dev:
Comment #7
Stephen Rockwell CreditAttribution: Stephen Rockwell commentedI'm having the same issue with alpha2
Comment #8
chr.fritschComment #9
woprrr CreditAttribution: woprrr as a volunteer and at NeoLynk commentedI have another errors during Upgrade path tests for media suite #2915738: Increase reliability of upgrade path to Media in core fixture.
A fatal error during dropzonejs_eb_widget_update_8201()
The following patch does fixe this issue.
Have you upgrade and used Media in core before updb ? I can't reproduce this error in my upgrade tests .
Comment #10
woprrr CreditAttribution: woprrr as a volunteer and at NeoLynk commentedSo sorry ... forget to attach patch O_O
Comment #11
BerdirProblem with that approach that it's just hiding a deeper problem. You seem to have broken configuration, to a media type that doesn't exist anymore, or maybe the update didn't run to update the configuration key, so your browser will be broken.
instead of silently doing nothing, you could throw a useful exception, like dependency on non-existing media type X in entity browser Y so you see what/where the problem is.
Comment #12
woprrr CreditAttribution: woprrr as a volunteer and at NeoLynk commentedwrong duplicate $media_type
Yes, That's happen after update of media suite 8.3.7 => 8.4.2 the 2.x branch of eb_widget are only based on media_type provided by core media. In my case I'm just before upgrade with media_entity 2.x. This is more a miss configuration / miss during upgrade path than a real problem. In all cases using $media_type directly withou any test seem's to be dangerous. To your suggestion about exeception to prevent this kind of miss can we test the version of media_entity (2.x are mandatory at this point) installed AND/OR if media (core) is installed if Yes, NULL isn't normal but if on of thoses conditions are not respected we can throw an exception to explain we try to use eb_widget designed for media in core with a media_entity.
Comment #13
chr.fritschWhat about implementing hook_update_dependencies to ensure the media_entity upgrade path is already finished?
Comment #14
chr.fritschLike this
Comment #16
slashrsm CreditAttribution: slashrsm at MD Systems GmbH commentedWorks fine. Committed.
Also set up the Jenkis job to push from GitHub to drupal.org. Commiters make sure that you push to GH from now on.
Comment #17
rwam CreditAttribution: rwam commentedOne question: should the last patch be more specific? The patch doesn't make sense in my eyes resp. it prevented updating if you haven't media_entity installed. I work with media from core only and update 8202 is pending now because of the patch. I removed the dependency and the update was performed.
Comment #19
miax CreditAttribution: miax commentedI'm experiencing the same problem as rwam (#17) is experiencing. We do not use the media_entity module and because of this the update won't apply. Added a patch that checks if media_entity module is installed before using the dependency. This fixes the issue for us and the update is applied correctly.
Comment #20
BerdirPlease open a new issue for that, this won't be visible enough/get committed here.
Comment #21
miax CreditAttribution: miax commentedThanks for letting me know.
I added a comment and patch to this active issue instead: update 8202 will not apply, causing Drupal to think there is always an update pending