Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS

Static Publisher - <% control Menu(2) %> not working correct


Go to End
Reply

10 Posts   4106 Views

Avatar
Gutur

2 July 2009 at 7:49pm (Last edited: 2 July 2009 7:50pm), Community Member, 17 Posts

Hello everyone,
StaticPublisher now works fine but there's one glitch left. The menu entries in the exported .html pages are not correctly highlighted.

<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Link zur Seite &quot;$Title.XML&quot;">$MenuTitle.XML</a></li>
<% end_control %>


Always returns the very first menu entry as class="current" and the rest as class="link".
That works as expected in normal cms-mode (SiStri 2.3.1).

Thanks in advance for help :) /Carsten

Avatar
Gutur

4 July 2009 at 3:48am Community Member, 17 Posts

ReHi,

just upgraded to 2.3.2 and still not working correctly. Seems like a bug to me as I can't find anything I did wrong or forgot to do.
Anyone has any experience with this? Could verify or falsify this bug?

Cheers /Carsten

Avatar
kheeteck

7 July 2009 at 3:48pm Community Member, 7 Posts

Hi

I shared the same problem as you.

I think it is definitely a bug.

Is there anyway for the SilverStripe team to be notified of this bug

Avatar
Willr

9 July 2009 at 7:21pm Forum Moderator, 5511 Posts

Please raise all issues as tickets on open.silverstripe.org

Avatar
martimiz

14 August 2009 at 7:10pm Forum Moderator, 1091 Posts

This issue was raised before by someone who had a temp fix for it. Unfortunately I can't find the original post to give hime/her credit, so I'll give you what I found in my notes:

This is apparently caused by caching in DataObject::get_one(). The templating engine re-uses cached pageObjects, and it seems $LinkingMode is cached. One temp fix was to flush the cache in FilesystemDirector before rendering the next page. I have no idea about performance issues this might give, but here goes:

In FilesystemPublisher - line 53:

Requirements::clear();
$response = Director::test($url);
Requirements::clear();

replace by:

Requirements::clear();
singleton('DataObject')->flushCache();
$response = Director::test($url);
Requirements::clear();

Avatar
martimiz

14 August 2009 at 7:10pm (Last edited: 14 August 2009 7:24pm), Forum Moderator, 1091 Posts

[EDIT] something went horribly wrong on my posts: I received an error on posting, so I tried again... After the last post finally succeeded I now have flushed this topic with multiple post I can't remove.... Really sorry, will edit all of them to make them smaller...

Avatar
Sam

18 August 2009 at 12:36pm Administrator, 685 Posts

Hi Martimiz,

The issue you were having posting should have been fixed now.

Avatar
Gutur

19 August 2009 at 5:15am Community Member, 17 Posts

Hi Martimiz, that did the trick, thanks a bunch! The Website is not so big anyway, so I can't tell if it's a hit on performance. I'm taking your note over to the bugtracker now ;)

Go to Top