Re: Inconsistency with Silva Sidebar view
Martijn Faassen <[email protected]>
| Newsgroups | gmane.comp.web.zope.silva.devel |
|---|---|
| Message-ID | <[email protected]> |
Luthiger Stoll Benno wrote: > We stumbled over a strange problem in one of our virtual sites (on > our mass hosting site at the ETH): The Silva sidebar navigation seems > to be out of sync and doesn't reflect the content of the publication > anymore. To be more precise: The sidebar navigation in the SMI shows > a content that differs both from the main content box and the content > viewed in the ZMI. It displayes two additional Silva folders that > don't exist and, thus, can't be deleted or manipulated. > > I then created a Python Script in the ZMI in this publication and > called the following: return > context.service_sidebar.render(container, 'tab_edit', 'contents') > > The content displayed was exactly the same content as in the sidebar > box in the SMI. I thought that maybe the sidebar cache is the > problem. Therefore, I tried to invalidate the object in the sidebar > cache: context.service_sidebar.invalidate(container) > > However, this didn't improve the situation. > > I'm not sure whether SidebarService.invalidate() works correct. The > code in the methode 'invalidate()' is not virtual root aware, whereas > the code in SidebarService.render() takes care of possible virtual > roots. Overall, it's been a long time since we wrote the sidebar caching code and it didn't seem to give many problems in the field, so I'm surprised what could've caused this inconsistency now. Which Silva version is this? Do you have any idea why these silva folders are displayed? Presumably they got created and then later deleted without some update to the sidebar cache. Being able to reproduce this problem somehow would be a good way for us to start solving the root cause. It should be possible to refresh the sidebar cache by adding a new folder, or moving a folder around or somesuch. But, if the invalidate method doesn't work properly, there's a good chance that won't work either... It's possible virtual hosting indeed has something to do with it, even though we did take issues like this into account when we originally wrote the code; I would need to spend more time trying to understand what the code did again to track this down. Regards, Martijn