Try our conversational search powered by Generative AI!

Circular reference exception when deleting page with referenced image in 'For This Page'

Found in

EPiServer.CMS.Core 10.0.1

Fixed in

EPiServer.CMS.Core 10.2.0

(Or a related package)

Created

Nov 17, 2016

Updated

Jun 27, 2018

Area

CMS Core

State

Closed, Fixed and tested


Description

Steps to reproduce

  1. Create a new page of type Standard Page.
  2. Upload new image to the "This Page folder".
  3. Drag and drop image to the Content area.
  4. Move page to trash. A confirmation dialog appears "Would you like to move the page page-1 to the trash?"
  5. Click Move to Trash.

Expected: Move to trash successfully without warning message.
Actual: Dialog displays "Failed to move the content "page-1" beneath the content "Recycle Bin". But page is moved to trash.

WORKAROUND: Define language settings on the root page.

This error is logged in the the log:

Failed to Get because of circular references
at EPiServer.Core.Internal.DefaultContentLanguageSettingsHandler.ValidateCircularReference(ContentReference contentLink, HashSet`1 visitedContents)
at EPiServer.Core.Internal.DefaultContentLanguageSettingsHandler.Get(ContentReference contentLink, HashSet`1 visitedContents)
at EPiServer.Core.Internal.DefaultContentLanguageSettingsHandler.GetSetting(ContentReference contentLink, HashSet`1 visitedContents)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at EPiServer.Core.Internal.DefaultContentLanguageSettingsHandler.GetSetting(ContentReference contentLink, HashSet`1 visitedContents)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at EPiServer.Core.Internal.DefaultContentLanguageSettingsHandler.GetSetting(ContentReference contentLink, HashSet`1 visitedContents)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at EPiServer.Core.Internal.DefaultContentLanguageSettingsHandler.Get(ContentReference contentLink)
at EPiServer.Core.Internal.DefaultContentLanguageSettingsHandler.Get(ContentReference contentLink, String languageBranch)
at EPiServer.Core.Internal.LanguagePipeline.Pipe(ContentReference contentLink, IContent contentInstance, LoaderOptions loaderOptions, Func`3 loadingDelegate)
at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItem(ContentProvider provider, ContentReference contentLink, LoaderOptions loaderOptions)
at EPiServer.Core.Internal.DefaultContentLoader.TryGet[T](ContentReference contentLink, LoaderOptions loaderOptions, T& content)
at EPiServer.Core.Html.StringParsing.ContentFragment.GetContent(Boolean enableMasterLanguageFallback)
at EPiServer.Core.Html.StringParsing.ContentFragment.GetSecurityDescriptor()
at EPiServer.Core.Html.StringParsing.StringFragmentCollection.AddFilteredFragment(String contentGroup, List`1 filteredFragments, IStringFragment fragment, ISecurable securable, IPrincipal principal)
at EPiServer.Core.Html.StringParsing.StringFragmentCollection.GetFilteredFragments(IPrincipal principal)
at EPiServer.Core.Html.StringParsing.StringFragmentCollection.FilterAndMergeStringFragments(StringMode mode, IPrincipal principal)
at EPiServer.SpecializedProperties.PropertyContentArea.ToWebString()
at EPiServer.Search.Internal.ContentSearchHandlerImplementation.<GetSearchablePropertyValues>d__36.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at EPiServer.Search.Internal.ContentSearchHandlerImplementation.AddSearchablePropertiesToIndexItem(IContent content, IndexRequestItem item)
at EPiServer.Search.Internal.ContentSearchHandlerImplementation.ConvertContentToIndexItem(IContent content, IndexRequestItem item)
at EPiServer.Search.Internal.ContentSearchHandlerImplementation.MoveItem(ContentReference contentLink)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at EPiServer.Core.Internal.DefaultContentEvents.RaiseContentEvent(String key, ContentEventArgs eventArgs)
at EPiServer.Core.Internal.DefaultContentRepository.MoveToWastebasket(ContentReference contentLink, String deletedBy, AccessLevel requiredAccess)
at EPiServer.Cms.Shell.UI.Rest.ContentChangeManager.Move(IContent source, IContent destination, Boolean createAsLocalAsset) in C:\Source\Stash\episerver-ui\EPiServer.Cms.Shell.UI\UI\Rest\ContentChangeManager.cs:line 398
at EPiServer.Cms.Shell.UI.Rest.Internal.ContentStore.MoveContent(IContent source, IContent destination, Boolean createAsLocalAsset, ActionResponse`1 response) in C:\Source\Stash\episerver-ui\EPiServer.Cms.Shell.UI\UI\Rest\Internal\ContentStore.cs:line 755