U4-547 - DocumentType AfterSave

Created by Sebastiaan Janssen 19 Aug 2012, 14:53:58 Updated by Morten Christensen 22 Mar 2013, 16:09:19

The properties DefaultTemplate and allowedTemplates have not changed when the AfterSave event is triggered for an DocumentType object.

I've tried to get the DocumentType by alias when AfterSave is triggered, the changes for these two properties have not taken place there either.

So I believe that DefaultTemplate and allowedTemplates for an DocumentType is not saved until after the AfterSave is triggered.

''Originally created on CodePlex by [icewolfy|http://www.codeplex.com/site/users/view/icewolfy]'' on 3/13/2012 11:11:43 AM [Codeplex ID: 30753 - Codeplex Votes: 1]

Comments

Matt Brailsford 12 Mar 2013, 18:11:12

I'd add to this the fact that allowed child nodes is also not set in the AfterSave event handler which I would assume is part of the same problem. This bug is currently causing DocTypeMixins to fail on the first save, requiring a second save to get the allowed child nodes.


Gary Daly 13 Mar 2013, 06:35:21

Hi Matt - Is this related to U4-1883? Having to make a second save to see "all" updates, content is fine but anything else requires a second save to have any effect.


Kevin Jump 19 Mar 2013, 18:48:42

It's still an issue in 4.11.5 and 6.0.3(nightly builds) - I've looked but i cant see where this is in the code to submit a patch.


Morten Christensen 22 Mar 2013, 16:09:02

For version 6 I believe part of the problem is that we are using the new API under the hood, so there is a change that some properties on the legacy Document object isn't updated properly during Save. So for this class I don't think there is any other way then to reload the object before passing it to the AfterSave event. In version 6 we can do this without any additional hits to the database, so I'll limit the fix to the 6.0.3 for now.


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 4.11.5, 6.0.3

Due in version: 6.0.3

Sprint:

Story Points:

Cycle: