U4-2167 - Using SaveAndPublish republishes xml instead of publishing xml

Created by Jan Højriis Dragsbæk 30 Apr 2013, 09:58:32 Updated by Morten Christensen 26 Jun 2013, 12:17:29

Relates to: U4-2182

As described in my forum post at http://our.umbraco.org/forum/developers/api-questions/40171-SaveAndPublish-not-regenerating-document-XML-in-the-new-API, I cannot programmatically publish (and regenerate the xml) on my documents.

When I use a macro that searches through nodes in the XML, the node that I called SaveAndPublish on, simply did not regenerate the XML. When I save and publish in the backoffice, it regenerates the xml just fine. I tried regenerating the XML the old way, but that had no effect either.

Reading up upon the docs, it seems like it does a "Republish" instead of a "Publish", see http://our.umbraco.org/wiki/reference/api-cheatsheet/publishing-and-republishing

EDIT: After using countless hours to figure exactly what happens, it looks like the Save method never sets implicit properties, like true/false to their default values (true/false should default to false, shouldn't it?)

This ticket is heavily related to U4-2182, as it is the same functionality.


Morten Christensen 26 Jun 2013, 12:17:23

I believe this issue is solved by the combination of U4-2182 being fixed and a recent update to the ContentService. As I recall the forum thread (linked above) the issue was a combination of the boolean values not being set explicitly and the ContentService which did not work as expected when the content item hadn't been saved (having no identity) prior to calling SaveAndPublish. So I'm marking this as fixed in 6.0.7.

Priority: Normal

Type: Bug

State: Fixed

Assignee: Morten Christensen

Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 6.0.3

Due in version: 6.0.7


Story Points: