I just upgraded our Sitecore 8.1 Update 2 install to Sitecore 8.2 Update 1.
Our solution has utilized MVC bundling since we implemented it a year ago.
But now -- after the upgrade -- bundling no longer works correctly.
The following Nuget packages are installed:
- Antlr 3.5.0.2
- Newtonsoft.Json 9.0.2-beta1
- Microsoft.Web.Infrastructure 1.0.0
- Microsoft.AspNet.Web.Optimization 1.1.3
- WebGrease 1.6.0
The namespaces in my Global.asax and Global.asax.cs match.
In the head of my layout I have:
@Styles.Render("~/bundles/css")
In my App_Start/BundleConfig.cs I have:
bundles.Add(new StyleBundle("~/bundles/css").Include(
"~/assets/css/bootstrap.css",
"~/assets/css/bootstrap-select.css",
"~/assets/css/font-awesome.css",
"~/assets/css/slick.css",
"~/assets/css/app.css",
"~/assets/css/back-to-top.css"
));
bundles.Add(new ScriptBundle("~/bundles/js").Include(
"~/assets/js/navigation.js",
"~/assets/js/bootstrap.js",
"~/assets/js/bootstrap-select.js",
"~/assets/js/handlebars.js",
"~/assets/js/moment-with-locales.js",
"~/assets/js/lodash.js",
"~/assets/js/slick.js",
"~/assets/js/jquery.browser.js",
"~/assets/js/jquery.onmutate.js",
"~/assets/js/js.cookie.js",
"~/assets/js/main.js",
"~/assets/js/jquery.validate*",
"~/assets/js/marketo.js",
"~/assets/js/back-to-top.js"
));
If I view source I see.
There is no ?v=somerandomstring like one would normally see.
The same thing occurs on my JS bundle.
If I add BundleTable.EnableOptimizations = false;
to the end BundleConfig.cs file it has zero effect. The same link gets written into the HTML.
This is driving me nuts. Did something in 8.2 break bundling?
UPDATE:
Removing the following from the Global.asax.cs file breaks the site:
protected void Application_BeginRequest()
{
Context.Items["Disable"] = new VersionCountDisabler();
}
My guess is that it is expected code and that my patch is not working / in the right place:
<httpRequestBegin>
<processor type="MySite.Presentation.Pipelines.HttpRequestBegin, MySite.Presentation" patch:before="processor[@type='Sitecore.Pipelines.HttpRequest.ExecuteRequest, Sitecore.Kernel']" />
</httpRequestBegin>
<httpProtocol><customHeaders><add name="X-UA-Compatible" value="IE=Edge" /></customHeaders></httpProtocol>