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.
Here is the patch with the improved check for access. Seems like the #access didn't work on the toolbar_item element. We need to wrap it in an if in order to not display anything (like libraries).
CreditAttribution: adriancid at Drupiter commented
Status:
Needs review
» Needs work
Thanks, @Berdir and @sasanikolic but the patch is now outdated after commit #3122957: Show search field by default? I running low of time now, can you reroll the patch?
Comments
Comment #2
sasanikolic CreditAttribution: sasanikolic at MD Systems GmbH commentedForgot to attach the screenshot.
Comment #3
sasanikolic CreditAttribution: sasanikolic at MD Systems GmbH commentedHere is the patch with the improved check for access. Seems like the #access didn't work on the toolbar_item element. We need to wrap it in an if in order to not display anything (like libraries).
Comment #4
BerdirI'd suggest an early return if you don't have access instead, that will be a much easier patch to review.
Comment #5
BerdirAlso, seems like it should be possible to test this?
Comment #6
sasanikolic CreditAttribution: sasanikolic at MD Systems GmbH commentedI added the check and return and improved the tests as suggested above.
Comment #7
adriancidThanks, @Berdir and @sasanikolic but the patch is now outdated after commit #3122957: Show search field by default? I running low of time now, can you reroll the patch?
Comment #8
sasanikolic CreditAttribution: sasanikolic at MD Systems GmbH commentedSure, I rebased the patch now.
Comment #9
BerdirLooks good now I think.
Comment #12
adriancidThanks
Comment #14
YahyaAlHamadUploaded a fast fix patch for 2.2 until a new version is released.