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.
Updated: Comment #11
Problem/Motivation
getAdminPath() is deprecated, it should be removed.
getAdminRouteInfo() points to the wrong route, it should be fixed
Proposed resolution
Add a FieldUI helper for the field overview page
Remaining tasks
N/A
User interface changes
N/A
API changes
getAdminPath() is removed, getAdminRouteInfo() now points to the bundle edit page (admin/structure/types/manage/article) instead of the field overview (admin/structure/types/manage/article/fields)
Original report by @Xano
Replace entity manager's getAdminPath()
with getAdminRouteInfo()
in Field UI as part of our effort to replace all path handling with route handling.
Comment | File | Size | Author |
---|---|---|---|
#36 | interdiff.txt | 522 bytes | tim.plunkett |
#36 | admin-path-2141329-36.patch | 28.21 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettgetAdminRouteInfo() was actually pointing to the field UI overview page, that was my fault way back in #1963394: ConfirmFormBase::getCancelPath() should allow for a route
Comment #9
Crell CreditAttribution: Crell commentedThis doesn't feel WSCCI related to me...
Comment #10
tim.plunkettIt's just menu stuff. Needs some reworking though.
Comment #11
tim.plunkettComments 2-8 were just retests and fails, I removed them.
Comment #16
tim.plunkettIt was a subdir install issue...
Comment #18
tim.plunkett16: field_ui-2141329-16.patch queued for re-testing.
Comment #20
tim.plunkettRerolled.
Comment #21
XanoComment #22
tim.plunkettThanks Xano :)
Reroll.
Comment #23
dawehnerI am not sure whether I can support that crappyness. Why do we have the url generator if we don't use it at all and rebuild it based on pure string replacement. I know it is kind of out of scope of this issue, though is changes part of it and moves it to the base class.
Comment #24
tim.plunkettOpened #2167641: EntityInterface::uri() should use route name and not path to address #23.
Comment #26
tim.plunkett22: admin-path-2141329-22.patch queued for re-testing.
Comment #27
dawehnerWow, I would have not expected that!
I just wonder why we don't inject stuff properly here.
Comment #28
tim.plunkett1) Yeah, me neither. Glad to have it fixed before it breaks.
2) I didn't inject it because I thought there was an issue about list controllers getting the link/url generator passed to it, but I can't find that. I'll look more and open an issue if there isn't one.
Comment #29
tim.plunkett22: admin-path-2141329-22.patch queued for re-testing.
Comment #30
webchickUnfortunately, needs a re-roll at this point. I'll try and get it in tonight/tomorrow.
Went through a bunch of dumb questions with Tim on IRC, the only one that means any work for this patch is:
The latter is passing $route_info['options'], the former is not. (Actually nowhere else seems to pass 'options' either in a quick scan.)
Comment #31
webchickMeant to do this.
Comment #32
tim.plunkettHappily rerolled after the excellent #2144919: Allow widgets and formatters for base fields to be configured in Field UI.
Only change was ensuring that we pass the options along to everything, as pointed out by @webchick.
Comment #33
chx CreditAttribution: chx commentedIs there a followup to get rid of
$this->url($route_info['route_name'], $route_info['route_parameters'], $route_info['options'])
Comment #34
tim.plunkettYep
Comment #36
tim.plunkettAhem.
Comment #37
webchickOk great, getting this in while it's hot. :)
Committed and pushed to 8.x. Thanks!
Marking for change notice.
Comment #38
dawehnerMade one on https://drupal.org/node/2174429
Comment #39
tim.plunkett