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.
<code>
The user is unable to add multiple content types to the shortcut bar by clicking the "add shortcut" star icon. This can be worked around by adding the shortcut manually via "Edit Shortcuts", but it is confusing as it stands. This does not seem to be a problem in D7. Here are a couple of animated gifs that demonstrate different behaviour between D7 and D8.
D8 - adding shortcuts via star icon
D7 - adding shortcuts via + icon
Steps to replicate.
1. Go to node/add/page
2. Click the star icon to add shortcut
3. Go to node/add/article
4. Star icon is already activated. Clicking it removes the page shortcut added earlier.
Comment | File | Size | Author |
---|---|---|---|
#22 | can_t_add_multiple-2511024-22.patch | 2.22 KB | jibran |
Comments
Comment #1
kattekrab CreditAttribution: kattekrab as a volunteer commentedNoticed the same problem when trying to add a short cut for multiple themes.
Comment #2
kattekrab CreditAttribution: kattekrab as a volunteer commentedDoes not seem to be a problem with People section. Was able to add Roles and Permissions as well as Top level People.
Comment #3
jibranThis issue is introduced in #2478151: Shortcuts to pages generated by views are not recognized as added to the shortcutset and are being added multiple times. After reverting that commit the issue got fixed.
Comment #4
lahoosascoots CreditAttribution: lahoosascoots as a volunteer commentedLooks like the issue in the last issue was that it was using the full parameters instead of the raw parameters.
As the patch removed the check for the full parameters it was only checking on route name. The route name for all content types is node.add they they are seen as the same page.
This patch should fix this issue and still work for admin/people.
Comment #5
lahoosascoots CreditAttribution: lahoosascoots as a volunteer commentedComment #6
jibran@lahoosascoots nice fix. Can we add quick tests for the issue described in IS? You can look at test added in #2478151: Shortcuts to pages generated by views are not recognized as added to the shortcutset and are being added multiple times for reference.
Comment #7
lahoosascoots CreditAttribution: lahoosascoots as a volunteer commentedWith tests. Test only patch should fail.
(Oops, put wrong comment #)
Comment #8
lahoosascoots CreditAttribution: lahoosascoots as a volunteer commentedGuess my test patches wern't good.
Comment #9
lahoosascoots CreditAttribution: lahoosascoots as a volunteer commentedAnd fixing my indentation issue.
Will fix anything that pops up tomorrow.
Comment #10
lahoosascoots CreditAttribution: lahoosascoots as a volunteer commentedComment #11
jibranNeeds a space after
//
and first line is more then 80 chars. Please see https://www.drupal.org/node/1354#inline for reference.Comment #12
kattekrab CreditAttribution: kattekrab as a volunteer commentedI had manually tested patch from #7 on simplytest.me and it works!
Screenshot:
Comment #13
kattekrab CreditAttribution: kattekrab at Creative Contingencies commentedComment #15
lahoosascoots CreditAttribution: lahoosascoots as a volunteer commentedComments fixed.
Comment #17
willzyx CreditAttribution: willzyx commentedoops sorry for the inconvenience..
Manually tested patch in #17 and it seems to solve the issue and it doesn't seems to generate problems with pages generated by views.
Patch looks good, just a nitpick
Comments need a trailing period
Comment #18
lahoosascoots CreditAttribution: lahoosascoots as a volunteer commentedHow DARE you make me do 4 more seconds of work!? =P
Should be the final patch.
Comment #20
willzyx CreditAttribution: willzyx commentedLooks good to me
Comment #21
alexpottThis is a negative assertion - can we also click the link to add the shortcut for the article page and ensure it gets added.
Comment #22
jibranGreat idea. Here we go. Setting it back to RTBC because I just added two asserts.
Comment #23
kattekrab CreditAttribution: kattekrab at Creative Contingencies commentedJust did another manual test. Working nicely. RTBC++
Comment #24
alexpottThis issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 84713a3 and pushed to 8.0.x. Thanks!
Comment #26
kattekrab CreditAttribution: kattekrab at Creative Contingencies commented\o/
Thanks @alexpott @jibran @willzyx @lahoosascoots :-)