Another problem I had was when I had to bulk move multiple nodes in one transaction.
After you've moved a document to a new parent, publishing the document isn't enough; you have to regenerate the XML from the parent down.
However, doing this every time using library.RefreshContent(); involves clearing the umbraco.config. Doing this whilst bulk-processing lots of documents means that the umbraco.config goes missing during transactions, and it will throw an exception.
To prevent this from happening, I introduced a config value to control whether that refresh takes place or not.
You can see what I've done here: You can read more about how to publish a document (including the answer I found) on the Umbraco wiki. When we've published the node and it's moved, the document's URL won't have updated. This is because the umbraco.config hasn't been updated from the database, so to get this to forcibly update, you have to:
- Stop the website application pool
- Delete the /app_data/umbraco.config file
- Start the application pool
When this is done, your document URLs should be updated.
Let me know if any of this isn't clear, and I'll do my best to clarify!
No comments:
Post a Comment