New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dual entries caused site to crash #30

roomtoread opened this Issue Dec 29, 2017 · 1 comment


None yet
2 participants

roomtoread commented Dec 29, 2017

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)


This comment has been minimized.

Show comment
Hide comment

poornimanayar Jan 15, 2018

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

poornimanayar commented Jan 15, 2018

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 join this conversation on GitHub. Already have an account? Sign in to comment