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.
Convert contact_category_list, contact_category_add, and contact_category_edit to new-style Controllers using the instructions on http://drupal.org/node/1800686 . All of those methods can go on the same controller class.
Then, convert the delete form to new-style form controller based on the instructions on the same page.
Related
#1995620: [policy, no patch] Document how to handle routes for MENU_DEFAULT_LOCAL_TASK
Comment | File | Size | Author |
---|---|---|---|
#23 | contact-1938386-23.patch | 5.46 KB | tim.plunkett |
#23 | interdiff.txt | 2.91 KB | tim.plunkett |
#17 | interdiff.txt | 1.45 KB | andypost |
#17 | 1938386-contact-route-17.patch | 4.44 KB | andypost |
#16 | interdiff.txt | 541 bytes | andypost |
Comments
Comment #1
mkadin CreditAttribution: mkadin commented*Sets his crosshairs on this one*
Comment #2
mkadin CreditAttribution: mkadin commentedTrying to figure out what's wrong with the title callback on the edit page.
Comment #3
Crell CreditAttribution: Crell commentedComment #5
mkadin CreditAttribution: mkadin commentedI've got a few issues / questions:
1) title_callback isn't being passed an upcasted entity. Looks like defining route_name in your hook_menu() means that that 'path' in the menu system has the symfony style path with entity types enclosed in {}. Perhaps we need to postpone this and starta new issue for dealing with this.
2) Also, I can't seem to figure out the local task piece. Should I be defining two separate routes for /admin/structure/contact/manage/{contact_category}/edit and /admin/structure/contact/manage/{contact_category} ? I dropped the title stuff for now and then tried to figure that out. No configuration (one, the other, or both) led to a result where all of the pages returned content and all of the local task tabs were working properly.
Comment #6
Crell CreditAttribution: Crell commentedDefault local tasks have always required double-entry in the menu system. That hasn't changed at this point.
As discussed in IRC, we probably should hold on this one until we change how the path gets bridged over, and/or let the menu system deal with {} placeholders.
Comment #7
mkadin CreditAttribution: mkadin commentedPostponed until this is settled #1945418: New-style placeholders in menu_router table break breadcrumbs, menu tree, etc
Comment #8
jibranAs per #7
Comment #9
mkadin CreditAttribution: mkadin commentedrerolled, but still not working. On the admin/structure/contact page there's a new error:
Also going to the edit page for a contact category throws a big ol error. It seems as though #1945418: New-style placeholders in menu_router table break breadcrumbs, menu tree, etc didn't clear up the issue with title arguments / title callbacks.
Comment #10
tim.plunkettHeads up, #1983844: Add EntityListController and convert picture.module callbacks to routes/controllers to provide a use-case will add a generic list controller you can use for contact_category_list().
Comment #11
tim.plunkettBlocks #1908756: Separate Action Links (MENU_LOCAL_ACTION) from hook_menu()
Comment #12
andypostList controller in separate issue #599770-22: Clean up the contact forms listing UI: Allow to set the default category and weights on the listing page
Comment #13
dawehnerMy temporary fix has been to set tab_root to the actual root. The problem is that there is a single router entry with a different path.
... missing newline
Let's sort them.
Needs docs.
There should be an empty line between them.
Comment #14
andypostThere's no need in special controller at all
Should be
as introduced in #1983844: Add EntityListController and convert picture.module callbacks to routes/controllers to provide a use-case
EntityFormController already have $this->entity so enough in routing
Comment #15
andypostNew patch, somehow got
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32 bytes) in core8/core/lib/Drupal/Core/Routing/RouteProvider.php on line 122
for list and addComment #16
andypostthis fixes memory issue but makes
admin/structure/contact/manage/feedback/edit
404 so onlyadmin/structure/contact/manage/feedback
worksComment #17
andypostnasty hack to make it work
Comment #19
dawehner#17: 1938386-contact-route-17.patch queued for re-testing.
Comment #20
ParisLiakos CreditAttribution: ParisLiakos commentedawesomeness
Comment #21
dawehner@andypost
Can you explain why we need two routes even tim's approach on #1995620: [policy, no patch] Document how to handle routes for MENU_DEFAULT_LOCAL_TASK is to use only one?
Comment #22
andypost@dawehner not sure I get how to use 1 route, probably better make it in follow-up
Comment #23
tim.plunkettLike this.
We should never be adding double routes on purpose.
Also, fixing the double use of default.
Comment #24
andypostAwesome idea.
Would be nice to add to "policy" issue
Comment #25
alexpottCommitted 1d26631 and pushed to 8.x. Thanks!
Comment #26
andypostit seem that need follow-up for titles
Comment #28
PanchoOh yeah, probably - and too bad actually.
Comment #29
tim.plunkettPlease open a follow-up issue.
Comment #30.0
(not verified) CreditAttribution: commentedadded related