Ticket #7155 (closed Bug: fixed)
selectedTabs.py: portal_tab linked to external url will show as selected on home page
|Reported by:||jessesnyder||Owned by:||limi|
selectedTabs.py seems to assume that all action url's are internal. If you add an action with an external url shorter than plone_url, this action may be returned rather than default_url when you are on the home page or at the site root. The result is that this external url tab will show as 'selected'. It seems like it shouldn't behave this way; an external link portal_tab should never be 'selected'.
The following seems to fix, at least in my environment:
for action in portal_tabs: # start patch if not action['url'].startswith(plone_url): continue # end patch action_path = action['url'][len(plone_url):] if not action_path.startswith('/'): etc...