Hi guys,

Do you know that the class="expanded" is added just and only because a menu has $data['below'] set? That does not mean it has any items below itself since all of those could be hidden.

The only I can see is to generate the element '#below' field and check the result instead of testing $data['below'].

I'm attaching a patch to give you an idea of what I'm talking about.

Thank you.
Alexis Wilke

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch, menu-expanded_class-7.x.patch, failed testing.

AlexisWilke’s picture

Status: Needs work » Needs review

menu-expanded_class-7.x.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, menu-expanded_class-7.x.patch, failed testing.

apaderno’s picture

Status: Needs work » Needs review
FileSize
1.25 KB

I re-rolled the patch.

Status: Needs review » Needs work

The last submitted patch, 813736_fix_expanded_class.patch, failed testing.

apaderno’s picture

Status: Needs work » Needs review

#4: 813736_fix_expanded_class.patch queued for re-testing.

retester2010’s picture

#4: 813736_fix_expanded_class.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 813736_fix_expanded_class.patch, failed testing.

mertskeli’s picture

AlexisWilke’s picture

Detect a non-applicable patch
Ensure the patch applies to the lastest checkotu of the code-base.

Wow! For once the failure is real... I little more, I'll be impressed. Although the spelling is still funky. 8-)

I'm offering a new patch. The other change was not helping much with this problem as noticed by mertskeli.

Thank you.
Alexis

AlexisWilke’s picture

Status: Needs work » Needs review

Hmmm... It looks like the new patch won't be checked by the system, right?! Do I have to post it again?

Status: Needs review » Needs work

The last submitted patch, menu-expanded_class_2-7.x.patch, failed testing.

AlexisWilke’s picture

Status: Needs work » Needs review
FileSize
1.35 KB

Rhaaa... wrong path. 8-P

mertskeli’s picture

Sorry if I'm wrong, but probably it is a problem with menu items treating actions-links as children. It's not only about "expanded", it affects "collapsed" as well. It's a D7 bug (was not present in D5 and D6).

AlexisWilke’s picture

It is definitively a D7 bug. The code has changed quite a bit. But I could not tell you whether "collapsed" is affected. I had problems with simplemenu and this fixes them.

Thank you.
Alexis

Damien Tournoud’s picture

This basically restores a band-aid that we had in Drupal 6... it doesn't fix the real issue at all.

AlexisWilke’s picture

Damien,

Could you describe what the real issue is? Pretty please?

Thank you!
Alexis

mertskeli’s picture

Seems like it has been fixed. But do not know how, by whom and when.
Alexis, could you confirm?

jelo’s picture

Can you please elaborate on how Drupal 6 is affected by this? In my case a parent menu item that has an unpublished child gets the class "collapsed" although it should get a "leaf" class. If it was fixed in 7, will there be a fix for 6?

AlexisWilke’s picture

jelo,

D6 is not going to be fixed for such problems, I don't think.

The class collapsed is better than expanded when there are not children at all to show.

I have not been testing with D7 in a while, so I do not know whether it is fixed. Once I have git access, I will be testing some menu related modules so I may have a minute to come back to this one.

Thank you,
Alexis

jelo’s picture

Thanks, that would be great. Damien mentioned that there has been some larger problem with this in D6 and a bandaid solution. Could someone please briefly mention what the underlying problem is? Apparently, the menu already checks for each menu item if there is a child, but that does not seem to include if the child is published or not. Wouldn't it be sufficient to add the check for the status of the child?

mgifford’s picture

Assigned: AlexisWilke » Unassigned
Issue summary: View changes
Status: Needs review » Needs work

@AlexisWilke's patch no longer applies.