Closed (fixed)
Project:
Media entity
Version:
8.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Plan
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Oct 2017 at 13:15 UTC
Updated:
12 Nov 2019 at 09:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
phenaproximaHere is a patch (mostly consisting of a compressed database fixture) that tests Media Entity's hook_requirements.
Comment #3
phenaproximaDerp. Forgot to change the status.
Comment #5
marcoscanoBroadened a bit the scope of the issue.
For example, the drush command we are providing is not going to be compatible with Drush 9, we should address that.
Comment #6
marcoscanoPostponing this on #2877383: Add action support to Media module
Comment #7
marcoscanoRe-purposing this to make this a plan and wrap all other little bugs that are bubbling up.
Comment #8
marcoscanoComment #9
marcoscanoIf I understand correctly, this test assumes a codebase in a state that matches the fixture (drupal-8.3.7-media-suite). Can't we try to avoid that? It will quickly start to get very difficult to manage that while running tests. (By the way, I'm not sure if it's possible at all)
In other words, if you are running this test in a codebase with
media_entity_instagram2.x, the assertwill fail.
However, if we are running tests that use the fixture 8.4 (that assumes different codebases), we'll need to update the codebase before running the test.
Comment #10
marcoscanoActually, let's move the discussion about patch #2 to #2916821: Improve automated tests of Media Entity upgrade path to Media core and keep this issue as a plan.
(I have moved the patch there and re-commented what I said above)
Comment #11
marcoscanoComment #12
marcoscanoComment #13
marcoscanoComment #14
marcoscanoComment #15
marcoscanoComment #16
marcoscanoComment #17
marcoscanoComment #18
marcoscanoAdded the link to the manual testing spreadsheet to the IS.
Comment #19
marcoscanoRegarding:
I went through the list in #2860796: Plan for contributed modules with Media Entity API in core and checked all projects that have 2.x branches available. Some of them have no information about when to use 1.x versus 2.x, and others have some information but it's still not clear in some cases that you can indeed use the 1.x branch with core 8.4.x.
My suggestion is to make that very explicit, because users are already getting confused by the mix of versions.
A possible wording of text to be used could be something like:
Below are the modules that I checked and their maintainers (as stated on the project page):
@Maintainers: could you please check the project page and see if the text can be improved? Thanks!
Comment #20
marcoscanoI could ping directly all maintainers listed above, with the exception of:
Does anyone have means to reach them, or know other people with access to these project pages? If not, I can also create an issue on the project's issue queue.
Comment #21
sam152 commentedAdded a slightly modified version of the description in #19 to the video_embed_field project page and the release notes for latest version on each branch. I've also marked the 2.x branch as "supported", so it appears on the project page.
I think as soon as the media_entity contrib is marked as unsupported, that can be the trigger for all the other contribs to mark their contrib media branches as unsupported too.
Comment #22
dawehnerAdding this documentation to all the media helper modules is a great idea!
I added the mention on both facebook and tumblr. Thank you! It would be nice to be able to link to a handbook page explaining things with more details.
Comment #23
marcoscanoThanks @Sam152 and @dawehner!
Re:
You can! :)
There is a brief documentation guide about the core Media module, and a specific FAQ page about the most common questions. By the way, feedback about the text there is more thank welcome! Please let me know if you see any information missing or not clear enough!
Comment #24
marcoscanoAdded #2921983: Core upgrade path does not account for views that validate by media bundle to the IS.
Comment #26
phenaproximaI'm crediting @bdimaggio on this issue for having gone through the test spreadsheet (linked in the IS) and tested all the scenarios, as well as creating fixtures for each to ease further testing. All the karma unto him!
Comment #27
phenaproxima#2916947: Make sure the upgrade path works with Drush 8 and Drush 9 landed!
Comment #28
phenaproxima#2917124: Create Media Entity Actions to hold actions not included in 8.4.x landed too, and #2919381: Don't cache media_entity_type_plugins with it.
Comment #29
marcoscanoSo I believe #2923400: Source data for Image media entities lost during upgrade to core's Media module should definitely be here as well.
Comment #30
marcoscanoThere should also be a solution for sites using EXIF image handling and want to upgrade. Added #2925712: Media Entity Image 8.x-2.x - core Media API roadmap & integration to the IS as well.
Comment #31
marcoscanoAdded #2923372: Upgrade fails if site has "medium" image style missing to the IS.
With that, I believe we are in a position of saying that the remaining goals for "upgrade path stability" are:
- Achieving "confidence" with the manual testing
- Providing a solution for sites using EXIF mapping (#2925712: Media Entity Image 8.x-2.x - core Media API roadmap & integration)
Comment #32
marcoscanoIS housekeeping
Comment #33
geek-merlinRan into this: #2928025: Update dies: "LogicException: Missing bundle entity media_type file"
Comment #34
geek-merlinWorked around that issue by updating in 2 steps.
So let's do this:
#2928114: Add to instructions that only 2-step update is supported
It may win us a lot of time for other things.
Any objections?
Comment #35
geek-merlinAdded some more gotchas:
* #2928121: 2 media types with same source confuses update
* #2928123: Configuration broken: Zombie media_type_file
Comment #36
marcoscanoAdded the last issues to the IS as well.
Comment #37
geek-merlinAdded: #2928336: Media "name" missing in display
Comment #38
marcoscanoAdded #2927149: Updating from Media Entity to core Media creates a new video source field to the list of must-haves.
Comment #39
marcoscanoReplaced #2925712: Media Entity Image 8.x-2.x - core Media API roadmap & integration by #2927481: Integrate sites relying on EXIF metadata handling in the media upgrade path on the IS, which better reflects the issue.
Comment #40
marcoscanoAdded #2877378: Add token replacements for Media to the list of must-haves, now that we know that there would be missing tokens.
Comment #41
geek-merlinAdded minor #2930570: Views notice after media update.
Comment #42
tstoecklerI would like to say thank you for everyone that worked on the update path. I just performed this update on our platform and it was sooo much easier than I had expected, it was almost seamless.
I did hit #2928123: Configuration broken: Zombie media_type_file, so was happy I could just update to the latest dev, and I also found #2935194: Update leaves around stale tables and entity field definitions and #2935196: Module *un*installation at the end of update path fails if module is missing, but that's just sort of "cleanup" stuff. The update itself actually went really flawless, awesome!
Comment #43
marcoscanoThanks @tstoeckler!
I have added the new ones to the IS as well.
I think we may be very close to considering this "stable enough" for a beta. Leaving this in Needs Review for now.
Comment #44
marcoscanoAfter the agreement that tokens should not be considered as part of the API (see #2877378: Add token replacements for Media), I have downgraded the tokens-related issue to a "could have", which can be treated in a follow-up without necessarily blocking stability of ME 2.x. In any case, I have added a note to the upgrade instructions on the module page and on the handbook page, with instructions about how to proceed if a site relies on media tokens.
With that, I feel all important issues are at this point solved, so IMHO we can considered this as "done", at least to start a beta phase and encourage more testing and feedback.
Thanks everyone!
Comment #45
marcoscanoFiled #2935505: Inform users upgrading to Media in core that the Token module should be used after the upgrade as a follow-up to include the token recommendation in the upgrade process itself.
Comment #46
stevieb commentedJust a note ... I've being updating a multi site install and watching this ticket religiously .. after many tries over the last month, today was the first time the update went through smoothly .. all DB's in my enviorment were updated ... the new media module was installed and all media entity elements uninstalled.
thanks for the great work.
Comment #48
merilainen commentedI'm having a problem upgrading to use core's media, and I'm not sure where to report this.
Running drush updb goes smoothly and I don't get any errors, everything seems to work like before and the contrib modules are disabled correctly. But I cannot replace any files in existing or new media entities. Editing a media entity and changing a file will result in an empty file/image field. To me it seems file entity reference is lost on save. I don't get any errors in log. I noticed this when I tried to see if the thumbnail updating is really broken in core's media too. It turns out it's worse. I can't find any issues related to replacing files on core's media so I assume the problem is in the upgrade path. I don't have a vanilla Drupal 8 to test right now, but hopefully it's not broken there. All the file fields have been translatable if it's related to that somehow.
Other contrib modules related are: crop, video_embed_field and entity browser, but they seem to work fine.
Edit: Also saving a translation of a media entity without changing the file seems to empty the file field on the translation, so the problem might be related to the field being translatable.
Edit2: I also tried to create a new Image media type "New image" and marked the file property as translatable. Same thing happens: Cannot replace a file on existing media entity, file field becomes empty after save, no errors in log. Possibly a core bug?
Edit3: Another developer tested replacing a file in a document media type and it works in core's media (they didn't have media_entity before), so I suppose this problem is related to the upgrade path somehow.
Comment #49
marcoscanoI've tried to reproduce this but couldn't.
- Clean 8.6.x install
- Enable Media and Content Translation, add a second language
- Mark media Image bundle as translatable, select the file itself as translatable
- Create a Media entity with file A
- Edit the media entity and replace file A with file B
- Create a translation of the entity, replacing the file B with file C
Everything seems to work fine, do you see something different from your testing?
Comment #50
merilainen commentedWell I have Drupal 8.5.1 and media_entity was used, so I tried to upgrade to core's media. Your testing confirmed that something is not right in the upgrade path, thank you for testing.
Comment #51
tomsch commentedHi,
thanks so much for documenting and organizing the upgrade path. I managed to upgrade with drupal 8.6.12, but the update hooks were never shown when I activated media-entity 2.x with media in core disabled. Eventually I deleted the unused modules myself and activated media in core manually.
See my bash snippet to follow what I did. A
drush updbstafter line 16 did not show any updates. Adrush mecusaid everything was OK.At a first glance everything seems to work fine, the new media types are there and can be created, all media-related modules can be activated.
Now I am asking myself if there could be sure way to check?
I also wonder if I could have carried out the update before unknowingly and confusingly reverted back to media contrib?