Skip to content
This repository has been archived by the owner on Apr 14, 2019. It is now read-only.

Dual entries caused site to crash #30

Open
roomtoread opened this issue Dec 29, 2017 · 1 comment
Open

Dual entries caused site to crash #30

roomtoread opened this issue Dec 29, 2017 · 1 comment

Comments

@roomtoread
Copy link

We accidentally entered the same redirect twice. When we tried to delete the second entry, the delete feature seemed to not work. We tested the redirect and it worked correctly. Later that day our site crashed and now returns the errors below. What can we do to quickly remedy this and get our site back online as quickly as possible - even if we need to temporarily disable the Simple 301 module?

2017-12-29 18:07:21,663 [P6324/D2/T23] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
System.TypeInitializationException: The type initializer for 'Simple301.Core.RedirectRepository' threw an exception. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at Simple301.Core.RedirectRepository.FetchRedirectsFromDb() at Simple301.Core.RedirectRepository..cctor() --- End of inner exception stack trace --- at Simple301.Core.RedirectRepository.FindRedirect(String oldUrl) at Simple301.Core.RedirectContentFinder.TryFindContent(PublishedContentRequest request) at Umbraco.Web.Routing.PublishedContentRequestEngine.<FindPublishedContent>b__28(IContentFinder finder) at System.Linq.Enumerable.Any[TSource](IEnumerable1 source, Func`2 predicate)
at Umbraco.Web.Routing.PublishedContentRequestEngine.FindPublishedContent()
at Umbraco.Web.Routing.PublishedContentRequestEngine.FindPublishedContentAndTemplate()
at Umbraco.Web.Routing.PublishedContentRequestEngine.PrepareRequest()
at Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext)
at Umbraco.Web.UmbracoModule.b__8(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

@poornimanayar
Copy link

go into the database, find the table called redirects and delete the entry which you dont want. That fixed it for me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants