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.
Problem/Motivation
The Add new @node_type or Log in to... local action on forum.index (/forum) and forum.page (/forum/TID) are not wrapped in a <ul>
markup.
Forum listing page
Forum thread
Proposed resolution
Update the ForumController::buildActionLinks to wrap local links in a <ul>
.
This solution is the same workaround used in class BlockLibraryController::buildLocalActions.
Remaining tasks
Write a patch- Review
User interface changes
Local actions link on forum are correctly wrapped in a ul markup.
API changes
None
Comment | File | Size | Author |
---|---|---|---|
#26 | HTML-AddForumTopicBtn.png | 133.79 KB | paulocs |
#24 | interdiff_17-24.txt | 917 bytes | raman.b |
#24 | 2828680-24.patch | 1.85 KB | raman.b |
#18 | Screenshot-from-2020-09-15-12-30-05.png | 82.71 KB | amietpatial |
#17 | after-patch-forum.png | 222.97 KB | bandanasharma |
Comments
Comment #2
mogtofu33 CreditAttribution: mogtofu33 as a volunteer and at Catalyst IT commentedComment #3
larowlanIs there a #theme menu_local_actions we could put on the container?
Comment #4
Chi CreditAttribution: Chi commentedI just filed a similar issue which however is not related to this one because forum action links come directly from controller. Back in Drupal 7 the links were generated in hook_menu_local_tasks_alter(), which still exists in Drupal 8.
#2829997: Local action links should be inside UL element
I would move the links back to actions area but leave the "disallowed" message in place since it is not an action and not even a link.
Comment #8
borisson_#3: There is no theme for local actions that I could find.
The patch no longer applies.
We should get screenshots for this error as well.
Comment #9
damontgomery CreditAttribution: damontgomery commentedComment #10
damontgomery CreditAttribution: damontgomery commentedI updated the issue summary with screenshots using 8.5. I didn't need to create any content. There is no UL, but the functionality seems ok.
Comment #12
drclaw CreditAttribution: drclaw at Fuse Interactive commentedHere's a patch re-roll against 8.8.x
Comment #14
enzipher CreditAttribution: enzipher commentedPatch in #12 works fine for me. Thanks!
Comment #16
tanubansal CreditAttribution: tanubansal at Salsa Digital commentedul wrapper is missing on forum local at drupal 9.1. Is there any patch for 9.1?
Comment #17
bandanasharma CreditAttribution: bandanasharma as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commentedRe-roll the patch for d9 and also added after patch image.
Comment #18
amietpatial CreditAttribution: amietpatial as a volunteer and at gai Technologies Pvt Ltd for gai Technologies Pvt Ltd commented#17 works fine on drupal 9.1, after and before screenshot attached.
Comment #19
tanubansal CreditAttribution: tanubansal at Salsa Digital commentedTested the same on 9.1, working fine
this can be moved to RTBC
Comment #20
catchI think we should open a follow-up to see if we can find a better approach for this problem.
Comment #21
lauriii+1 on #20.
Comment #22
catchLet's do that before this actually goes in.
Comment #24
raman.b CreditAttribution: raman.b at OpenSense Labs commentedCreated #3181052: Find a better approach to wrap local action links in a <ul>
Comment #25
paulocsComment #26
paulocsPatch #24 looks good.
The patch has a documentation that mentions the follow-up that was pointed on comment #20.
Moving to RTBC.
Comment #29
catchCommitted/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!
I'll unpostpone the follow-up.