If you have just the wildcard, without any load, then rendering a link (either menu or tab) was broken. There was no example for this in core so it was not obvious. However, when I was writing docs and wanted to say that search tabs are not trivial then I realized that search redirects to search/node/foo hence search/node/% should be enough. The "when rendering a path that contains a % , replace te % with the actual argument" rule got lost, so I fixed it. This actually simplifies search.module and more exposes what _menu_translate does.

CommentFileSizeAuthor
#5 tabs_fix_0.patch2.15 KBchx
#4 tabs_fix.patch2.49 KBchx
simplify_tabs.patch3.5 KBchx

Comments

chx’s picture

Status: Needs review » Needs work
chx’s picture

Status: Needs work » Needs review

Further consideration tells me this is the best way.

chx’s picture

Status: Needs review » Needs work

Neh! this , at the end of the day, does too much unneeded work with path. no, we need to store the empty match on building step (probably as FALSE) and then we will know which steps to perform.

chx’s picture

Title: Simplify and fix simple wildcards » Fix tab bugs
StatusFileSize
new2.49 KB
  • The depth calculation of tabs were broken when parent is set for a tab, making locale tabs really funny.
  • The simple wildcards were ignored.
chx’s picture

StatusFileSize
new2.15 KB

Minus the debugging chunk.

gábor hojtsy’s picture

Status: Needs work » Reviewed & tested by the community

Coincidentally I just approached Karoly for a fix for this bug affecting locale module, so we can work on improvements for Drupal 6-dev. Tested this patch, and it seems to be working all fine on the locale interface. It fixes the funny display bugs which appear without this patch (sometimes the primary sometimes the secondary tabs are shown, but never both).

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks chx.

Anonymous’s picture

Status: Fixed » Closed (fixed)