- Issue created by @tstoeckler
- π©πͺGermany tstoeckler Essen, Germany
Here we go. Needed this, so I thought why not put in Entity API directly since all the parts are already there we just need some glue to put them together. I can also put this in a small glue module if people don't think this is a good place.
Two notes on the patch:
- The workaround for #2927077: $entity->toUrl('revision-*') should fill revision parameter on all applicable routes. β is a bit unfortunate, but it's a hard requirement because of the links generated on the revision overview.
- I didn't run into any issues with the "hardcoded" local task even if Media module is uninstalled. Theoretically we could also add dynamic deriver to only add the local task if Media module is installed. I wasn't able to use the DefaultEntityLocalTaskProvider because that would mean the "View" and "Edit" local tasks are duplicated.
- π©πͺGermany tstoeckler Essen, Germany
Just realized we could do the same for custom blocks and taxonomy terms (and menu links?) if we want, but would love some feedback first.
- π©πͺGermany tstoeckler Essen, Germany
Hmm... further testing shows that we need another workaround. This really did turn a fair bit less elegant than I originally thought, so I truely don't mind if people think this should be a separate module, but still waiting for feedback first.
- πΊπΈUnited States moshe weitzman Boston, MA
We need this at mass.gov. I see an alternate approach at https://www.drupal.org/project/media_revisions_ui β . Would be good to decide if this is going in or just close it. Thanks.
- π©πͺGermany tstoeckler Essen, Germany
Yes, I saw that one as well, a while back. That one doesn't rely on Entity API so does more heavy-lifting on its own, but may be more appealing for site builders that otherwise wouldn't have Entity API installed. I personally still prefer the approach here but as there doesn't seem to be much movement here, I'm fine with closing this.
Of course someone could also take the patch here and turn that into a separate module, as well, with a dependency on Entity API.
Also, on a minor note: Now that #2927077: $entity->toUrl('revision-*') should fill revision parameter on all applicable routes. β has landed, the hunks in
RevisionOverviewController
(and I guess also inRevisionControllerTrait
) are no longer necessary, which would get the patch back to a fairly elegant state. This is only true for 9.1.x, though, so it does not apply to people needing this now. - π³π±Netherlands Martijn de Wit π³π± The Netherlands
β¨ Add Media revision UI Fixed is committed to core 10.2 that will be released end this year
- Status changed to Closed: outdated
about 1 year ago 9:11am 15 November 2023 - π©πͺGermany tstoeckler Essen, Germany
Ahh good point, yeah I don't think this is needed anymore. The patch is still there if people want to use it for older versions but it probably doesn't make sense to commit anything here, as far as I can tell.
Thanks for the bump!