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
This issue is basically a copy of this issue https://www.drupal.org/node/2631468. Because Superfish extends the SystemMenuBlock class the bug appears when using the superfish module as well.
The problem is the fact that setting an initial menu shows menu items that have parents other than the page the user is on.
Proposed solution
Add the patched code from the original issue to the Superfish block build code.
Comment | File | Size | Author |
---|---|---|---|
superfish_initial_menu_level.patch | 1.34 KB | willem_ |
Comments
Comment #2
Arnoldski CreditAttribution: Arnoldski commentedThis patch worked for me! Thanks!
Comment #3
xenophyle CreditAttribution: xenophyle commentedYes, this worked for me too
Comment #4
mehrpadin CreditAttribution: mehrpadin commentedHey there,
Are you experiencing this with D8.5.5 and the latest Superfish dev release? because I've just tested and it's working just fine. Thanks.
Comment #5
xenophyle CreditAttribution: xenophyle commentedNo, sorry, I am using 8.x-1.2. I was assuming it was still a bug since the ticket was active. I guess we can resolve this one. Thanks!
Comment #6
xenophyle CreditAttribution: xenophyle commentedOh, I was wrong: The dev release doesn't seem to fix the bug reported here. It might not be described clearly enough.
Parent 1
|_ Child 1-1
|_ Child 1-2
|_ Child 1-3
Parent 2
|_ Child 2-1
|_ Child 2-2
|_ Child 2-3
Parent 3
|_ Child 3-1
|_ Child 3-2
|_ Child 3-3
I have initial visibility level = 2 and levels to display = 2.
If I am on page Child 3-1, I see not just Child 3-1, Child 3-2, and Child 3-3 in the menu, but all Child items. The patch addresses that.
Comment #7
ivnish CreditAttribution: ivnish commentedComment #8
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commentedPatch can't be applied anymore
Comment #9
mrinalini9 CreditAttribution: mrinalini9 at Srijan | A Material+ Company for Drupal India Association commentedHi,
The source code in the above attached patch has already been merged to
8.x-1.x
branch, that's why the patch is not applicable anymore.Thanks!
Comment #10
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commented