When upgrading from 1.3.0 to 1.4.0 via composer there is a missing module `crop_media_entity` on the latest release.
Could we add documentation on the module to manually remove this module from core.extension.yml?
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 2937337-12.patch | 1.18 KB | woprrr |
| #8 | 2937337-8.patch | 951 bytes | woprrr |
Comments
Comment #2
abaier commentedI am experiencing the same warnings after updating with drush up.
Comment #3
jozzy_a commentedThe fix I used was remove it from the core.extension.yml and run the following drush command `drush sql-query "DELETE FROM key_value WHERE collection='system.schema' AND name='crop_media_entity';"`
Comment #4
abaier commentedThanks, I thought about that too. But before deploying this I would like to hear if there would be a way to cleanly apply the update.
I also got this in the console:
Comment #5
anybodySame problem here. I'm waiting for a solution within the module before hacking anything manually now.
Comment #6
abaier commentedI finally uninstalled crop_media_entity first and did the update to crop 1.4.0 afterwards. Worked without errors and hopefully I did not lose any data. But looks good.
Comment #7
woprrr commentedHi there,
Oh god ! Lot of people seem's to installed this deprecated sub-module.
To recontextualize the problem with this sub-module read :
During developpements I have pointed this fact but we have think anybody enabled this deprecated module and upgrade tests we have tested with Crop API only and not with that module enabled it's my bad sorry for noise !
Here a patch to solve the problems for people using this module.
Comment #8
woprrr commentedSmall adjust.
Comment #9
anybodyComment #10
anybodyThank you very much. It would be very helpful to have this commited to the latest version (incl. stable) to prevent others from a manual patch.
Comment #11
woprrr commentedI just wait feedback about others and make another release to fix that this morning ;)
Comment #12
woprrr commented@Anybody Thank for your previous fast review :) I just need to improve more and be sure this kind of problems or others possible are avoided. After small discuss with @Berdir about deprecated modules strategy we have pointed the example of entity_reference example seem's the best way to do that more cleany/easy.
It's possible to test that patch works cleany for all and then I can merge it fast today.
Comment #13
anybodyThank you very much. I didn't know that the possibility for an uninstall via service in a hook exists in D8. Perfect! Have you tested that the hook always runs before the module "crop_media_entity" doesn't exist anymore? Or isn't that a problem?
Comment #14
woprrr commentedThis isn't a problem because when you apply patch the minimum are here 'info.yml' and then update_n works to uninstall all trace of that module properly (it's better for your system stability than use database ;)).
All my tests are good to me I think we can merge arround 11PM
Comment #16
woprrr commentedMerged. Thank all and @Anybody for tests/reactivity ;)
Comment #17
les lim@woprr, it looks like you committed the patch in #8, but not the one in #12. Was that intentional?
Also, this still needs to be ported to the 8.x-2.x branch for people upgrading Drupal Core to 8.4.x.
Comment #18
lukus+1 for committing this to 8.x-2.x branch.
Comment #19
woprrr commentedHi there, Yes it's intentional because 2.x branch are a support branch for Media Core and that assume all media_entity reliquat are deleted. IMHO it's a good idea because that force people to use 1.4 before switch 2.x and prepare correctly media_entity upgrade. What's you feeling about that ? you think this does added in 2.x first release and delete it in 2.1 later ?
Not necessary if you still use media_entity but you can upgrade 1.4 first (stable) and after prepare your migrate with 2.x and use it for Media Core.
Comment #20
les limTwo arguments to that:
1. People don't know that they need to first upgrade to 1.4, and nothing actually prevents them from attempting to go to 2.x straight from 1.3 or before. That's why we preserve all hook_update_N() functions in the .install file across major versions.
2. If something goes wrong in the 2.x upgrade, then the system schema_version will refer to a hook_update_N() function that doesn't exist anymore. Not a huge deal, but potentially alarming to someone who is troubleshooting a broken upgrade.
Comment #21
jcnventuraIndeed, this MUST be in the 2.x branch. Two more reasons:
3. Imagine that you forget to skip 8003 in the 2.x branch, and create a 2.x-specific crop_update_8003(). Anyone updating from 1.4 will not get the update. If you believe you'll never forget this.. You've just made this module have a bus factor of 1.
4. Some of us (all, maybe...) are now going through the motions of disabling media_entity and adding support for core media. This module is one of those that should be updated to version 2. I have a site where we'll jump from version 1.0 to 2.0 without ever running 1.4. I can certainly do it in several steps, and the exported config from these steps should indeed disable the module. But there are workflows out there where composer will just replace the versions, and because people don't want to overwrite live's config, "drush updb" will be executed on the live server - that never had a version 1.4.
So add the hook_update_8003 to the 2.x branch asap, please :)
Comment #22
spokjeOops. nevermind.
Comment #23
henrijs.seso commentedThis must be primarily in 2.x branch. Just jumped from 1.2 to 2.0 and wasted a day. It applies cleanly and works for 2.x-dev and should be merged sooner. Also needs backport to 1.x branch.
Comment #25
woprrr commentedCome back to Crop ecosytem modules !!! Sorry for delay >-< Lot of media things...
The patch are now backported onto 8.2.x ! The next release as 8.2.0 will force all users to migrate and apply the update_8004() to delete definitively all traces of this deprecated module. We can foresee a deletion of the sub-module definitively for the release 8.2.5 (arround).
Comment #26
jcnventuraNice! It would have been better to have had it called crop_update_8003 also in the 8.x-2.x branch, but no harm done.
Also for future reference, the hook_update_n documentation recommends that these would be: