The "newsItem" document type has got a datepicker which I use as the datePropertyAlias in uDateFoldersy.config. Like this:
<DatePropertyAlias>newsDate</DatePropertyAlias>
Now, when I set the datepicker on Newsitem 3 to January 2012 and publish the node, it gets moved to News/2012/Jan as it should. However, in the umbraco.config XML, the XML isn't moved. The parentID is set correctly, but the Newsitem XML remains as a child element of the 2013/Apr node.
Parsing this in XSLT, it gives unexpected results :-) Since the following expression:
I think it may have something to do with the uDateFoldersy service not calling umbraco.library.UpdateDocumentCache() (or equivalent in v6 API) when the node is moved? :-) Just a quick shot in the dark, really.
Sure thing :-) Wanted to upgrade it anyway. Just upgraded to latest version of Umbraco (6.0.3), but it didn't make any difference :-/ It changes the the parentID attribute, but the XML stays as a child element of the same month folder.
Thanks Anthony :-) Although, I did another workaround which isn't pretty at all, but works (isn't that the mantra of workarounds, btw? ;-)) by hitting:
Updating the Umbraco XML cache when a node is moved
Hi all,
First of all: thanks for a great package which I've used in a lot of projects :-)
I've encountred a prolem in the latest uDateFoldersy running on Umbraco version 6.0.2. I have the following content structure:
The "newsItem" document type has got a datepicker which I use as the datePropertyAlias in uDateFoldersy.config. Like this:
Now, when I set the datepicker on Newsitem 3 to January 2012 and publish the node, it gets moved to News/2012/Jan as it should. However, in the umbraco.config XML, the XML isn't moved. The parentID is set correctly, but the Newsitem XML remains as a child element of the 2013/Apr node.
Parsing this in XSLT, it gives unexpected results :-) Since the following expression:
naturally proceses the XML tree structure.
I think it may have something to do with the uDateFoldersy service not calling umbraco.library.UpdateDocumentCache() (or equivalent in v6 API) when the node is moved? :-) Just a quick shot in the dark, really.
Any help/hint is greatly appreciated!
Thanks in advance.
- Bo
Interesting...
The package does it's work on the save event.
Are you clicking publish?
Hi Anthony,
Yup, I click the 'Save and Publish' icon :-)
hmm... Publish event is after Save. So any move of a node should be published.
Any chance of upgrading to umbraco 6.0.3 to see if there's any fix in there for the issue?
Hi again Anthony,
Sure thing :-) Wanted to upgrade it anyway. Just upgraded to latest version of Umbraco (6.0.3), but it didn't make any difference :-/ It changes the the parentID attribute, but the XML stays as a child element of the same month folder.
Thanks again.
- Bo
If I run the "Republish entire site" after I have set a different date (i.e. switching from 2012 to 2013), it does move the XML aswell though :-)
A work around... hit save. That will move the node.
Then hit "save and publish"
Thanks Anthony :-) Although, I did another workaround which isn't pretty at all, but works (isn't that the mantra of workarounds, btw? ;-)) by hitting:
before rendering any news. That did the trick aswell. It's not pretty and it's certainly not that performant, but it works ;-)
All the best,
Bo
eeek!... maybe it would be better to create an event hook for the after publish event of that doctype to do a refresh cache.
You're right, Anthony :-) Don't know why I didn't think of that. D'uh!
The site itself dosn't have that many nodes though, so the cacherefresh still performs alright.
I'll definitely refresh the cache in the after publish event, though. Good call there!
- Bo
is working on a reply...