This project is read-only.


Problems with versioning


In N2 version 2.4.7 a problem with saving previews/unpublished versions occured. Saving the previews worked ok, but when trying to save additional changes to a draft version, the system yields "The item couldn't be saved. Please look at the following: Another item already has the name 'whatever-url'."This was fixed in v 2.4.8, but sadly the very useful orange dot showing that a draft exists was no longer visible in the navigation tree. Upgrading to 2.4.9 solved the issue with the missing dot, but also reintroduces the defect in the versionining functionality.
Closed Apr 9, 2013 at 6:05 AM by bherila


faester wrote Nov 29, 2012 at 10:34 AM

I've looked into this some more.

The problem with saving a preview second time arises when the ContentItem is decorated with [WithAditableName].

In the NameEditor's Validate method the IntegrityManager.IsLocallyUnique is called.

This is turn delegates to ContentItem.Equals, where the id's is used for testing if the name clashes with another existing item. The test here should in this particular circumstance return true for
id == 0 && == 0 && VersionIndex != other.VersionIndex
since it - as far as the NameEditor is concerned - is effectively the same object albeit versioned differently.

But introducing this test breakes any meaningful semantics in the Equals-method, so another code path is probably needed.

PS: Please forget about the N2 versions mentioned above. The problem exists in both 2.4.7, 2.4.8 and 2.4.9

faester wrote Nov 29, 2012 at 1:04 PM

I have placed a pull request on github. This may have some issues, but can hopefully be used as a quickfix.

taj wrote Dec 6, 2012 at 9:54 AM

I also have a similar problem with Drafts and its pretty annoying that you can't Save the draft again and again.
I have tried almost every version of 2.4.x.x up to and none of them works. What

(It has been working in version where you could have multiple Drafts).

wrote Feb 22, 2013 at 1:24 AM

wrote Apr 9, 2013 at 6:05 AM

wrote May 16, 2013 at 12:42 PM