EPiServer 10 - Content Save Error

Vote:
 

Hello, 

We are currently in the progress of upgrading an existing EpiServer 9.12.2 installation to 10.10.1, but after some testing we came across this error :

ERROR EPiServer.Cms.Shell.Workspace.Committers.Internal.ContentDataCommitter: Unexpected error when saving 2462_22955
System.ArgumentException: The action 'Save | ForceCurrentVersion' is not valid on this content (ContentLink='2460_19234', Status='Published')
Parameter name: action
   at EPiServer.Core.Internal.DefaultContentRepository.CheckStatusTransition(StatusTransition transition, IContent content, SaveAction action, String paramName)
   at EPiServer.Core.Internal.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access)
   at EPi.Libraries.BlockSearch.SearchInitialization.OnPublishingContent(Object sender, ContentEventArgs contentEventArgs)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at EPiServer.Core.Internal.DefaultContentEvents.RaiseCancellableContentEvent(String key, String defaultReason, ContentEventArgs eventArgs)
   at EPiServer.Core.Internal.DefaultContentRepository.RaisePreSaveEvents(SaveContentEventArgs eventArgs, StatusTransition transition, Boolean isNew, Boolean isNewLanguageBranch)
   at EPiServer.Core.Internal.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access)
   at EPi.Libraries.BlockSearch.SearchInitialization.OnPublishedContent(Object sender, ContentEventArgs contentEventArgs)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at EPiServer.Core.Internal.DefaultContentEvents.RaiseContentEvent(String key, ContentEventArgs eventArgs)
   at EPiServer.Core.Internal.DefaultContentRepository.RaisePostSaveEvents(SaveContentEventArgs eventArgs, StatusTransition transition, Boolean isNew, Boolean isNewLanguageBranch)
   at EPiServer.Core.Internal.DefaultContentRepository.Save(IContent content, SaveAction action, AccessLevel access)
   at EPiServer.Cms.Shell.Service.Internal.ContentService.Save(IContent content, SaveAction saveAction, AccessLevel accessLevel)
   at EPiServer.Cms.Shell.Workspace.Committers.Internal.ContentDataCommitter.Commit(EditContentData change, CommitArguments argument)

A small search found me this post : https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2015/6/error-after-upgrade-to-8-5-quotusing-saveaction-save--saveaction-forcecurrentversion-on-published-content-is-not-allowedquot/

Which says it used to be a breaking change in the upgrade to Epi 8 (?) -- but this is not in 'self-written' code...

Any suggestions?

#181988
Sep 07, 2017 9:13
Vote:
 

What happens is that when a block gets published, the additional search content property of containing page gets updated.

Can you check if the content that is throwing the exception (ContentLink='2460_19234') is in the recycle bin?

#181992
Sep 07, 2017 12:18
Vote:
 

Hi Jeroen,

thank you for your reply. It is as you said; a block on a page gets edited and published, but throws the error ( it does actually get saved though! -- when you refresh the page, it loads the 'published version' ).

It also creates a 'draft' version of the block element.

And I checked the page it belonged to ( ContentLink='2460_19234' ), but it's not in the recycle bin.

#181993
Edited, Sep 07, 2017 13:00
Vote:
 

Hi Enne,

As the error is thrown in on of my libraries, or so it seems anyway, can you create an issue here? Can you list the versions of the packages you are using in the issue? Thnx.

Haven't heard of the error before, so maybe something has changed between 10.0.0 and 10.10.1 which breaks the functionality, though there shouldn't be any breaking changes within a major version, but you never know.

#181994
Sep 07, 2017 13:31
Vote:
 

Never mind, I have been able to reproduce it with an Alloy site on 10.10.1.

Something definitely changed somewhere down the road. I'll create a hotfix. Will be avalable on the feed soon I hope.

#181999
Sep 07, 2017 14:17
Vote:
 

Thank you for your fast reply. I wasn't able to create the issue in the meantime, sorry. But I see you were able to reproduce it.

I will await the hotfix :)

#182002
Sep 07, 2017 14:37
Vote:
 

Hi Enne,

I've submitted the hotfix, so depending on how soon the package will approved, it will start working again.

Thanks for bringing it to my attention.

#182040
Sep 08, 2017 9:53
Vote:
 

Sorry, I had completely forgotten to mark your answer. 

Thank you for solving the issue so quickly!

#182602
Sep 26, 2017 10:38
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.