TimGeyssens / BundlingAndMinificationForTheMasses

UI layer on top of http://aspnetoptimization.codeplex.com/ for Umbraco
http://www.nibble.be/?p=237
25 stars 5 forks source link

Error when upgrading to umbraco 7.2.2 and other issues #3

Closed jagbarcelo closed 9 years ago

jagbarcelo commented 9 years ago

We have just tried to upgrade to Umbraco 7.2.2 right from 7.2.1.

Optimus 1.2.1 was running just fine for the 7.2.1 version.

During the upgrade process, right after all manual file copies and merges of .config files, when browsing the site for the first time in order to finish the update, the process stalled. We could not get further than the page /umbraco/AuthorizeUpgrade?redir=%2finstall%2f%3fredir%3dtrue%26url%3dhttp...

The page AuthorizeUpgrade innerly requested the file /DependencyHandler.axd?s= which was throwing HTTP 500 Internal Server Errors. In ~/app_data/logs/UmbracoTraceLog.txt we could see errors like the following each time we tried to refresh the page:

2015-02-20 13:16:33,984 [46] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 48] An unhandled exception occurred System.InvalidOperationException: Esta operación no se admite en un URI relativo. en System.Uri.get_PathAndQuery() en ClientDependency.Core.CompositeFiles.Providers.BaseCompositeFileProcessingProvider.WritePathToStream(ClientDependencyType type, String path, HttpContextBase context, StreamWriter sw) en ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider.<>cDisplayClass3.b0(String s) en System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() en System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() en System.Collections.Generic.List1..ctor(IEnumerable1 collection) en System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) en ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider.CombineFiles(String[] filePaths, HttpContextBase context, ClientDependencyType type, List1& fileDefs) en ClientDependency.Core.CompositeFiles.CompositeDependencyHandler.ProcessRequestInternal(HttpContextBase context, String fileset, ClientDependencyType type, Int32 version, Byte[] outputBytes, OutputCachedPage page) en ClientDependency.Core.CompositeFiles.CompositeDependencyHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) en System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() en System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

The only workaround we found to finish the upgrade to 7.2.2 was to disable the optimisations (setting debug="true" in web.config). After this change the upgrade was able to finish. However...

When we tried to set debug="false" back in web.config Umbraco backend stopped working again (the site contents were served, but the backend was not available because of this error). So we are running it now in debug="true" mode.

Another weird thing that happens when debug is enabled, that might help pinpoint the source of the error (or errors) are the following: A. If, from the backend, we browse to Settings->Bundling->Scripts and click on any of the existing bundles, the background request to /App_Plugins/Optimus/Index?virtualPath=... fails with an HTTP 401 You must login to view this resource.

B. If we try to créate a new bundle, right clicking on Scripts (for instance, it fails for Styles too), and select + Create, the inner request made to /umbraco/create.aspx?nodeId=1&nodeType=scriptBundle&nodeName... returns with HTTP 500 Internal Server Error.

In this latter case, the error logged in UmbracoTraceLog.txt was:

2015-02-20 14:22:54,987 [30] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 57] An unhandled exception occurred System.Web.HttpUnhandledException (0x80004005): Se produjo una excepción de tipo 'System.Web.HttpUnhandledException'. ---> System.ArgumentException: The create dialog for "scriptBundle" does not match anything defined in the "~/umbraco/config/create/UI.xml". This could mean an incorrectly installed package or a corrupt UI file en umbraco.cms.presentation.Create.OnLoad(EventArgs e) en System.Web.UI.Control.LoadRecursive() en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) en System.Web.UI.Page.HandleError(Exception e) en System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) en System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) en System.Web.UI.Page.ProcessRequest() en System.Web.UI.Page.ProcessRequest(HttpContext context) en ASP.umbraco_create_aspx.ProcessRequest(HttpContext context) en c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\6ffd8b37\ea6ae51a\App_Web_create.aspx.5f2dec3.lfwndyig.0.cs:línea 0 en System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() en System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

TimGeyssens commented 9 years ago

Old issue, has been fixed...