Problem/Motivation
File entity provides field widgets for core file and image fields that use Entity browser for selection. File entity browser provided very similar widgets. To prevent redundant implementations we decided to merge and move them to the Entity browser itself, which happened in #2763505: Move file_entity and file_browser's Field Widget for Files and Images to Entity Browser.
Proposed resolution
Deprecate field widgets provided by file entity. Provide BC layer that will prevent duplicate widgets from appearing in UI. Idea was proposed in #2763505-4: Move file_entity and file_browser's Field Widget for Files and Images to Entity Browser.
Comment | File | Size | Author |
---|---|---|---|
#21 | file_entity-browser-2767185-20.patch | 13.36 KB | Berdir |
#21 | file_entity-browser-2767185-20-interdiff.patch | 2.34 KB | Berdir |
#17 | file_entity-browser-2767185-17.patch | 11.03 KB | Berdir |
#14 | file_entity-browser-2769695-14.patch | 9.5 KB | dmsmidt |
#14 | interdiff-2769695-10-14.txt | 681 bytes | dmsmidt |
Comments
Comment #2
tlyngej CreditAttribution: tlyngej at Annertech commentedJust to get something started (and my website back to a state where it is working) I'll post a patch that deletes the
FileEntityBrowser
class and the entity browser related settings in theschema.yml
file.Comment #3
BerdirHere's a patch that keeps the class empty and extend from the one. Haven't tested it yet, doing that now.
Comment #4
BerdirComment #5
BerdirThird try :)
Comment #10
BerdirNot my day :)
Comment #11
BerdirComment #14
dmsmidtAdded @depricated to the comment block.
Comment #15
BerdirDiscussed with @slashrsm. Tests aren't working because this relies on entity_browser, it fails if that module is not around. Note that this was a problem since this feature was added.
Due to that, we agreed that the best way forward is probably in fact going back to #2, deleting it. But we also need an update function then that looks at all form displays and tries to find a component that uses this and replaces it with the entity browser replacement.
Comment #16
dmsmidt@Berdir, yes that would be a better approach imho, since it leaves you with a cleaner state of a site.
That way we also don't have to figure out how to not show the widget in the UI.
Comment #17
BerdirOk, here is a patch that does exactly that.
Worked fine here on one site, some additional confirmations would be great.
Comment #19
MichelleThis patched fixed the broken form display config problem for me. Thanks!
Comment #20
BerdirFixing the failing tests. Unrelated, but wouldn't be possible to make them work without removing this class, so combining into a single test. interdiff does apply separately but will fail.
Comment #21
BerdirWrong patches, sorry.
Comment #24
slashrsm CreditAttribution: slashrsm at MD Systems GmbH for Acquia commentedShould we check version of Entity browser and fail if it is not >= alpha7?
Comment #25
BerdirHm, version checking is not reliable with git checkouts and so on.
We could check if the widget exists, but accessing that in an update function is also tricky, as the caches might not have been rebuild. Version dependency is also not possible as it not a dependency.
I'd just commit it, do a new release and put it in the release notes as a bold notice..
Comment #26
slashrsm CreditAttribution: slashrsm at MD Systems GmbH for Acquia commentedOK.
Comment #27
slashrsm CreditAttribution: slashrsm at MD Systems GmbH for Acquia commentedCommitted. Thanks.