Ticket #13805 (new Bug)

Opened 2 years ago

Last modified 2 years ago

heading_link_target on Navigation Portlet always returns '/sitemap'

Reported by: hvelarde Owned by: hvelarde
Priority: minor Milestone: 4.x
Component: Unknown Version: 4.3
Keywords: portlets Cc:

Description

if we use the Navigation Portlet and set root to a position different than the site root, we always get '/sitemap' in heading_link_target because getNavRootPath returns an unicode string and that always raises KeyError on getNavRoot.

the problem is  line 231 of navigation.py:

    return getRootPath(self.context, currentFolderOnly, topLevel, self.data.root)

root field stores data in unicode format and that makes getRootPath return an unicode also.

I'm not pretty sure on how to solve this: the easiest way it to cast self.data.root as str but I'm not sure if that's the best solution.

Change History

comment:1 Changed 2 years ago by hvelarde

the problems seems to be a little bit more trickier: self.data.root is unicode only if the portlet was created and assigned using GenericSetup.

Last edited 2 years ago by hvelarde (previous) (diff)
Note: See TracTickets for help on using tickets.