Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ian Black 54 posts 230 karma points
    Nov 28, 2013 @ 15:38
    Ian Black
    0

    404 error with bundled CSS

    Having a hard time getting Optimus (v.1.1.0) to work on my v6.1.6 install of Umbraco. It's the first time I've installed Optimus so I'm not upgrading.

    Created the bundle and added it to my master page using:

    <%: Styles.Render("~/bundles/styles") %>
    

    Got a compile error as Styles wasn't recognised so I added:

    <namespaces><addnamespace="System.Web.Optimization"/></namespaces>
    

    to the web.config and /views/web.config

    The page now loads but I get a 404 error when I try to view the CSS at /bundles/styles

    Any ideas? I tried installing the latest System.Web.Optimization from NuGet and I have this in the web.config:

    <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/bundles/" />
    

    Thanks, Ian.

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Nov 28, 2013 @ 15:54
    Tim Geyssens
    0

    Hmm can you post web.config make sure the dependency elements don't have the empty attribute (was a bug)

    Or might be that Optimus was unable to update your web.config if you post we can have a look

  • Ian Black 54 posts 230 karma points
    Nov 28, 2013 @ 16:20
    Ian Black
    0

    I just uninstalled and tried to reinstall the Optimus package and it crashed in the middle. I'm now getting a 500 server error when I try to access my website or the Umbraco backend so hopefully I can fix this and then I'll get back to you with the web.config file.

    I had looked for the empty attributes but didn't find any.

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Nov 28, 2013 @ 16:33
    Jeavon Leopold
    1

    Hi Ian,

    Do you have a pre-Optimus copy of your web.config and /views/web.config file you can revert to?

    It might be that you have an existing namespaces element in your config file, in Optimus v1.2.0 this would be checked and added to rather than you ending up with duplicates as happens in v1.1.0

    If you want to give it a try and are just using Optimus.Core and no providers, then you can get a preview copy of v1.2.0 from here (If you are using any providers, let me know, as you can't use v1.1 providers with v1.2)

    Jeavon

  • Ian Black 54 posts 230 karma points
    Nov 28, 2013 @ 16:53
    Ian Black
    0

    Thanks Jeavon.

    I've managed to restore the web.config so the website is back up and running.

    I then tried to install v1.2.0 but it's given me a 500 error during install as well so I'm not sure what's happened so that the installs keep failing.

    Here's my web.config after having attempted the install (broken) of v1.2.0. I notice that "~/bundles" isn't part of umbracoReservedPaths but maybe it didn't get to adding that before it crashed.

    <?xml version="1.0"?>
    <configuration>
      <configSections>
        <section name="urlrewritingnet" restartOnExternalChanges="true" requirePermission="false" type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter" />
        <section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
        <section name="clientDependency" type="ClientDependency.Core.Config.ClientDependencySection, ClientDependency.Core" requirePermission="false" />
        <section name="Examine" type="Examine.Config.ExamineSettings, Examine" requirePermission="false" />
        <section name="ExamineLuceneIndexSets" type="Examine.LuceneEngine.Config.IndexSets, Examine" requirePermission="false" />
        <section name="FileSystemProviders" type="Umbraco.Core.Configuration.FileSystemProvidersSection, Umbraco.Core" requirePermission="false" />
        <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false" />
        <section name="BaseRestExtensions" type="Umbraco.Web.BaseRest.Configuration.BaseRestSection, umbraco" requirePermission="false" />
        <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
          <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
        </sectionGroup>
        <sectionGroup name="jsEngineSwitcher">
          <section name="core" type="JavaScriptEngineSwitcher.Core.Configuration.CoreConfiguration, JavaScriptEngineSwitcher.Core" />
        </sectionGroup>
      </configSections>
      <urlrewritingnet configSource="config\UrlRewriting.config" />
      <microsoft.scripting configSource="config\scripting.config" />
      <clientDependency configSource="config\ClientDependency.config" />
      <Examine configSource="config\ExamineSettings.config" />
      <ExamineLuceneIndexSets configSource="config\ExamineIndex.config" />
      <FileSystemProviders configSource="config\FileSystemProviders.config" />
      <log4net configSource="config\log4net.config" />
      <BaseRestExtensions configSource="config\BaseRestExtensions.config" />
      <appSettings>
        <add key="umbracoConfigurationStatus" value="6.1.6" />
        <add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd,~/authorise.aspx" />
        <add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
        <add key="umbracoContentXML" value="~/App_Data/umbraco.config" />
        <add key="umbracoStorageDirectory" value="~/App_Data" />
        <add key="umbracoPath" value="~/umbraco" />
        <add key="umbracoEnableStat" value="false" />
        <add key="umbracoHideTopLevelNodeFromPath" value="true" />
        <add key="umbracoEditXhtmlMode" value="true" />
        <add key="umbracoUseDirectoryUrls" value="true" />
        <add key="umbracoDebugMode" value="true" />
        <add key="umbracoTimeOutInMinutes" value="20" />
        <add key="umbracoVersionCheckPeriod" value="7" />
        <add key="umbracoDisableXsltExtensions" value="true" />
        <add key="umbracoDefaultUILanguage" value="en" />
        <add key="umbracoProfileUrl" value="profiler" />
        <add key="umbracoUseSSL" value="false" />
        <add key="umbracoUseMediumTrust" value="false" />
        <!-- Set this to true to enable storing the xml cache locally to the IIS server even if the app files are stored centrally on a SAN/NAS Alex Norcliffe 2010 02 for 4.1  -->
        <add key="umbracoContentXMLUseLocalTemp" value="false" />
        <add key="webpages:Enabled" value="false" />
        <add key="enableSimpleMembership" value="false" />
        <add key="autoFormsAuthentication" value="false" />
        <add key="log4net.Config" value="config\log4net.config" />
      </appSettings>
      <system.data>
        <DbProviderFactories>
          <remove invariant="System.Data.SqlServerCe.4.0" />
          <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
          <remove invariant="MySql.Data.MySqlClient" />
          <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
        </DbProviderFactories>
      </system.data>
      <system.net>
        <mailSettings>
          <smtp>
            <network host="127.0.0.1" userName="username" password="password" />
          </smtp>
        </mailSettings>
      </system.net>
      <connectionStrings>
        <remove name="umbracoDbDSN" />
        <add name="umbracoDbDSN" connectionString="server=MYRTLE;database=XXXXXX;user id=sa;password=XXXXXX" providerName="System.Data.SqlClient" />
        <!-- Important: If you're upgrading Umbraco, do not clear the connection string / provider name during your web.config merge. -->
      </connectionStrings>
      <system.web>
        <customErrors mode="Off" />
        <trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
        <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
        <globalization requestEncoding="UTF-8" responseEncoding="UTF-8" />
        <xhtmlConformance mode="Strict" />
        <httpRuntime requestValidationMode="2.0" enableVersionHeader="false" />
        <pages enableEventValidation="false">
          <!-- ASPNETAJAX -->
          <controls>
            <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add tagPrefix="umbraco" namespace="umbraco.presentation.templateControls" assembly="umbraco" />
            <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          </controls>
        </pages>
        <httpModules>
          <!-- URL REWRTIER -->
          <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
          <!-- UMBRACO -->
          <add name="UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco" />
          <!-- ASPNETAJAX -->
          <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <!-- CLIENT DEPENDENCY -->
          <add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" />
        </httpModules>
        <httpHandlers>
          <remove verb="*" path="*.asmx" />
          <!-- ASPNETAJAX -->
          <add verb="*" path="*.asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
          <add verb="*" path="*_AppService.axd" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
          <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
          <!-- UMBRACO CHANNELS -->
          <add verb="*" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
          <add verb="*" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
          <!-- CLIENT DEPENDENCY -->
          <add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
          <!-- SPELL CHECKER -->
          <add verb="GET,HEAD,POST" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
        </httpHandlers>
        <compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.0">
          <assemblies>
            <!-- ASP.NET 4.0 Assemblies -->
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
            <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
            <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          </assemblies>
          <buildProviders>
            <add extension=".cshtml" type="umbraco.MacroEngines.RazorBuildProvider, umbraco.MacroEngines" />
            <add extension=".vbhtml" type="umbraco.MacroEngines.RazorBuildProvider, umbraco.MacroEngines" />
            <add extension=".razor" type="umbraco.MacroEngines.RazorBuildProvider, umbraco.MacroEngines" />
          </buildProviders>
        </compilation>
        <authentication mode="Forms">
          <forms name="yourAuthCookie" loginUrl="login.aspx" protection="All" path="/" />
        </authentication>
        <authorization>
          <allow users="?" />
        </authorization>
        <!-- Membership Provider -->
        <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
          <providers>
            <clear />
            <add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" />
            <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
          </providers>
        </membership>
        <!-- added by NH to support membership providers in access layer -->
        <roleManager enabled="true" defaultProvider="UmbracoRoleProvider">
          <providers>
            <clear />
            <add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" />
          </providers>
        </roleManager>
      </system.web>
      <!-- ASPNETAJAX -->
      <system.web.extensions>
        <scripting>
          <scriptResourceHandler enableCompression="true" enableCaching="true" />
        </scripting>
      </system.web.extensions>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <modules runAllManagedModulesForAllRequests="true">
          <remove name="UrlRewriteModule" />
          <add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
          <remove name="UmbracoModule" />
          <add name="UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco" />
          <remove name="ScriptModule" />
          <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <remove name="ClientDependencyModule" />
          <add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" />
          <!-- Needed for login/membership to work on homepage (as per http://stackoverflow.com/questions/218057/httpcontext-current-session-is-null-when-routing-requests) -->
          <remove name="FormsAuthentication" />
          <add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
        </modules>
        <handlers accessPolicy="Read, Write, Script, Execute">
          <remove name="WebServiceHandlerFactory-Integrated" />
          <remove name="ScriptHandlerFactory" />
          <remove name="ScriptHandlerFactoryAppServices" />
          <remove name="ScriptResource" />
          <remove name="Channels" />
          <remove name="Channels_Word" />
          <remove name="ClientDependency" />
          <remove name="SpellChecker" />
          <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          <add verb="*" name="Channels" preCondition="integratedMode" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
          <add verb="*" name="Channels_Word" preCondition="integratedMode" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
          <add verb="*" name="ClientDependency" preCondition="integratedMode" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
          <add verb="GET,HEAD,POST" preCondition="integratedMode" name="SpellChecker" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
        </handlers>
        <!-- Adobe AIR mime type -->
        <staticContent>
          <remove fileExtension=".air" />
          <mimeMap fileExtension=".air" mimeType="application/vnd.adobe.air-application-installer-package+zip" />
        </staticContent>
        <!-- Ensure the powered by header is not returned -->
        <httpProtocol>
          <customHeaders>
            <remove name="X-Powered-By" />
          </customHeaders>
        </httpProtocol>
      </system.webServer>
      <system.codedom>
        <compilers>
          <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
            <providerOption name="CompilerVersion" value="v4.0" />
            <providerOption name="WarnAsError" value="false" />
          </compiler>
        </compilers>
      </system.codedom>
      <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <!-- Old asp.net ajax assembly bindings -->
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0" />
          </dependentAssembly>
          <!-- Ensure correct version of MVC -->
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
            <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
          </dependentAssembly>
          <!-- Ensure correct version of HtmlAgilityPack -->
          <dependentAssembly>
            <assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
            <bindingRedirect oldVersion="1.4.5.0-1.4.6.0" newVersion="1.4.6.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="BundleTransformer.Core" publicKeyToken="973c344c93aac60d" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-1.8.12.0" newVersion="1.8.12.0" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
          </dependentAssembly>
          <dependentAssembly>
            <assemblyIdentity name="MsieJavaScriptEngine" publicKeyToken="a3a2846a37ac0d3e" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-1.1.3.0" newVersion="1.1.3.0" />
          </dependentAssembly>
        </assemblyBinding>
      </runtime>
      <system.web.webPages.razor>
        <host factoryType="umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines" />
        <pages pageBaseType="umbraco.MacroEngines.DynamicNodeContext">
          <namespaces>
            <add namespace="Microsoft.Web.Helpers" />
            <add namespace="umbraco" />
            <add namespace="Examine" />
          </namespaces>
        </pages>
      </system.web.webPages.razor>
      <bundleTransformer xmlns="http://tempuri.org/BundleTransformer.Configuration.xsd">
        <core>
          <css>
            <translators />
            <minifiers>
              <add name="NullMinifier" type="BundleTransformer.Core.Minifiers.NullMinifier, BundleTransformer.Core" />
            </minifiers>
          </css>
          <js>
            <translators>
              <add name="NullTranslator" type="BundleTransformer.Core.Translators.NullTranslator, BundleTransformer.Core" enabled="false" />
            </translators>
            <minifiers />
          </js>
        </core>
      </bundleTransformer>
      <jsEngineSwitcher xmlns="http://tempuri.org/JavaScriptEngineSwitcher.Configuration.xsd">
        <core>
          <engines>
            <add name="MsieJsEngine" type="JavaScriptEngineSwitcher.Msie.MsieJsEngine, JavaScriptEngineSwitcher.Msie" />
          </engines>
        </core>
      </jsEngineSwitcher>
    </configuration>
    
  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Nov 28, 2013 @ 16:59
    Jeavon Leopold
    1

    Strange, 500 error is probably because you are missing the bundleTransformer section group:

    <sectionGroup name="bundleTransformer">
      <section name="core" type="BundleTransformer.Core.Configuration.CoreSettings, BundleTransformer.Core" />
    </sectionGroup>
    

    Could you please check and post any error from /App_data/Logs/UmbracoTraceLog.txt log file

  • Ian Black 54 posts 230 karma points
    Nov 28, 2013 @ 17:14
    Ian Black
    101

    The web.config was in use by a process so couldn't be written to. I think that's what was causing the problem. I've tried another install and it worked. I had to manually add "~/bundles" to the web.config though.

    The css is now being combined but in the file it says that the minification failed with:

    /* Minification failed. Returning unminified contents. (1276,48): run-time error CSS1036: Expected expression, found '}'

    From a quick Google at looks as if this isn't a problem with Optimus but rather something wrong in the CSS or a bug in how the minifier handles CSS3.

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Nov 28, 2013 @ 17:20
    Jeavon Leopold
    0

    Hi Ian,

    Ok, I would interested to see the contents of your log file from when you installed v1.2 if possible?

    I had success with your web.config, I added the section group manually, then installed Optimus again (you can do this with v1.2) which added the other missing parts, including the namespace required by webforms

    <pages enableEventValidation="false">
      <!-- ASPNETAJAX -->
      <controls>
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="umbraco" namespace="umbraco.presentation.templateControls" assembly="umbraco" />
        <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </controls>
      <namespaces>
        <add namespace="System.Web.Optimization" />
      </namespaces>
    </pages>
    <httpModules>
    

    I wonder what's locking the web.config...

    Jeavon

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Nov 28, 2013 @ 17:21
    Jeavon Leopold
    0

    Have you checked that line 1276 in the combined but not minified file, there is probably a simple syntax error to be updated.

  • Ian Black 54 posts 230 karma points
    Nov 28, 2013 @ 17:22
    Ian Black
    0

    The fact that I had it open could be something to do with it? :)

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Nov 28, 2013 @ 17:24
    Jeavon Leopold
    0

    Depends what it was open in, there should be an entry in the log file which might reveal more....

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Nov 28, 2013 @ 17:28
    Tim Geyssens
    0

    Yup looks like syntax error in your css

  • Ian Black 54 posts 230 karma points
    Nov 28, 2013 @ 17:36
    Ian Black
    0

    Thanks Jeavon. Managed to find the error in the CSS which was around that line and it's now minifiying but there were problems in the display. Turns out I was including a print css file which had media="print" in the html but obviously Optimus wouldn't know that it was for print only so I removed it from the bundle and it's working perfectly now!

    2013-11-28 16:06:01,459 [84] INFO  Umbraco.Core.UmbracoApplicationBase - [Thread 81] Application shutdown. Reason: BinDirChangeOrDirectoryRename
    2013-11-28 16:06:04,850 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Determining hash of code files on disk
    2013-11-28 16:06:04,897 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Hash determined (took 16ms)
    2013-11-28 16:06:04,912 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of umbraco.interfaces.IApplicationStartupHandler
    2013-11-28 16:06:05,178 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of umbraco.interfaces.IApplicationStartupHandler, found 18 (took 265ms)
    2013-11-28 16:06:05,240 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter
    2013-11-28 16:06:05,240 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter, found 0 (took 8ms)
    2013-11-28 16:06:05,256 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Web.Mvc.SurfaceController
    2013-11-28 16:06:05,256 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Web.Mvc.SurfaceController, found 0 (took 6ms)
    2013-11-28 16:06:05,256 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Web.WebApi.UmbracoApiController
    2013-11-28 16:06:05,272 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Web.WebApi.UmbracoApiController, found 3 (took 6ms)
    2013-11-28 16:06:05,272 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Core.Media.IThumbnailProvider
    2013-11-28 16:06:05,272 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Core.Media.IThumbnailProvider, found 3 (took 7ms)
    2013-11-28 16:06:05,272 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of Umbraco.Core.Media.IImageUrlProvider
    2013-11-28 16:06:05,287 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of Umbraco.Core.Media.IImageUrlProvider, found 1 (took 7ms)
    2013-11-28 16:06:05,725 [13] INFO  Umbraco.Web.Search.ExamineEvents - [Thread 83] Initializing Examine and binding to business logic events
    2013-11-28 16:06:06,037 [13] INFO  Umbraco.Web.Search.ExamineEvents - [Thread 83] Adding examine event handlers for index providers: 3
    2013-11-28 16:06:06,147 [13] ERROR System.Web.Optimization.BundleCollection - [Thread 83] Error adding bundles: System.NullReferenceException: Object reference not set to an instance of an object.
       at BundleTransformer.Core.Transformers.CssTransformer.CreateDefaultMinifier()
       at BundleTransformer.Core.Transformers.CssTransformer..ctor(IMinifier minifier, IList`1 translators, String[] ignorePatterns, CoreSettings coreConfig)
       at BundleTransformer.Core.Transformers.CssTransformer..ctor(IMinifier minifier, IList`1 translators, String[] ignorePatterns)
       at Optimus.BundleConfig.RegisterBundles(BundleCollection bundles)
    System.NullReferenceException: Object reference not set to an instance of an object.
       at BundleTransformer.Core.Transformers.CssTransformer.CreateDefaultMinifier()
       at BundleTransformer.Core.Transformers.CssTransformer..ctor(IMinifier minifier, IList`1 translators, String[] ignorePatterns, CoreSettings coreConfig)
       at BundleTransformer.Core.Transformers.CssTransformer..ctor(IMinifier minifier, IList`1 translators, String[] ignorePatterns)
       at Optimus.BundleConfig.RegisterBundles(BundleCollection bundles)
    2013-11-28 16:06:06,162 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of umbraco.interfaces.IApplication
    2013-11-28 16:06:06,178 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of umbraco.interfaces.IApplication, found 7 (took 20ms)
    2013-11-28 16:06:06,256 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Starting resolution types of umbraco.interfaces.ITree
    2013-11-28 16:06:06,303 [13] INFO  Umbraco.Core.PluginManager - [Thread 83] Completed resolution of types of umbraco.interfaces.ITree, found 28 (took 48ms)
    2013-11-28 16:06:09,647 [13] INFO  Umbraco.Core.PluginManager - [Thread 88] Starting resolution types of umbraco.interfaces.IPackageAction
    2013-11-28 16:06:09,662 [13] INFO  Umbraco.Core.PluginManager - [Thread 88] Completed resolution of types of umbraco.interfaces.IPackageAction, found 25 (took 27ms)
    2013-11-28 16:06:09,725 [13] ERROR umbraco.cms.businesslogic.packager.PackageAction - [Thread 88] Error loading package action 'Umbundle.SetAttributeValue' for package Optimus.Core
    System.IO.IOException: The process cannot access the file 'D:\Websites\XXXXXX\web.config' because it is being used by another process.
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at System.Xml.XmlDocument.Save(String filename)
       at Optimus.Umbraco.Installer.SetAttributeValue.Execute(String packageName, XmlNode xmlData)
       at umbraco.cms.businesslogic.packager.PackageAction.RunPackageAction(String packageName, String actionAlias, XmlNode actionXml)
    2013-11-28 16:06:09,850 [13] WARN  Optimus.Umbraco.Installer.AddBundleTransformerProvider - [Thread 88] Error at AddBundleTransformerProvider package action: Attribute "enabled" not found.
    2013-11-28 16:06:09,866 [13] WARN  Optimus.Umbraco.Installer.AddBundleTransformerProvider - [Thread 88] Error at AddBundleTransformerProvider package action: Attribute "enabled" not found.
    2013-11-28 16:06:10,209 [13] ERROR umbraco.cms.businesslogic.packager.PackageAction - [Thread 88] Error loading package action 'Umbundle.SetAttributeValue' for package Optimus.Core
    System.IO.FileNotFoundException: Could not find file 'D:\Websites\XXXXXX\config\appSettings.config'.
    File name: 'D:\Websites\XXXXXX\config\appSettings.config'
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
       at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
       at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
       at System.Threading.CompressedStack.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
       at System.Xml.XmlTextReaderImpl.OpenUrl()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
       at System.Xml.XmlDocument.Load(XmlReader reader)
       at Umbraco.Core.XmlHelper.OpenAsXmlDocument(String filePath)
       at Optimus.Umbraco.Installer.SetAttributeValue.Execute(String packageName, XmlNode xmlData)
       at umbraco.cms.businesslogic.packager.PackageAction.RunPackageAction(String packageName, String actionAlias, XmlNode actionXml)
    
  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Nov 28, 2013 @ 17:46
    Jeavon Leopold
    0

    Great, thanks. I will have a look and see if we can check if the config file being accessed is in use by another process before attempting to add to it.

    At least you have have v1.2 already :-)

  • Ian Black 54 posts 230 karma points
    Nov 29, 2013 @ 11:07
    Ian Black
    0

    Thanks for the help!

    I had the web.config open in visual studio at the time of installation.

    Also, I'm noticing that in 1.2 it will bundle the files even if "debug=true" is set in the config file - maybe that's just because you guys are still testing at the moment before release?

    Thanks again, Ian.

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Nov 29, 2013 @ 12:06
    Tim Geyssens
    1

    Hey there is also a optimus setting you need to configure if you want to to follow the debug setting :) check the /app_plugins/optimus/*.config file

  • Ian Black 54 posts 230 karma points
    Nov 29, 2013 @ 15:08
    Ian Black
    0

    That's brilliant, cheers Tim!

  • Christopher Vaught 29 posts 54 karma points
    Dec 02, 2013 @ 19:33
    Christopher Vaught
    1

    I struggled with this for quiet some time until finding a solution mainly because of my web.config.appSettings.config file.

    Modifying the following key with the ~/bundles/ path pretty much took care of my issues.  

      <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/bundles/" />

    Found it strange that this wasn't added to my web.config by the install.

     

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Dec 02, 2013 @ 20:00
    Jeavon Leopold
    0

    Hmm, we do have a package action that should do that. Just to check, are you using Umbraco v7 and Optimus v1.2.0?

    If you could check your log file from when you installed Optimus and post any exceptions logged it be really useful?

    Thanks,

    Jeavon

  • Christopher Vaught 29 posts 54 karma points
    Dec 02, 2013 @ 20:23
    Christopher Vaught
    0

    I am using Umbraco 6.1.6 since Umbraco 7 ( isn't supported by our staff yet )

     

  • Christopher Vaught 29 posts 54 karma points
    Dec 02, 2013 @ 20:24
    Christopher Vaught
    0

    No errors to speak of in our UmbracoTraceLog

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Dec 02, 2013 @ 20:33
    Tim Geyssens
    0

    Yeah it should add them but in v7 the app settings are stored in different file in /config so maybe a permissions issue...

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Dec 02, 2013 @ 20:36
    Jeavon Leopold
    0

    Ah ok, so you have moved your appsettings to web.config.appSettings.config instead of web.config?

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Dec 02, 2013 @ 22:38
    Jeavon Leopold
    1

    This discussion inspired me to write a new package action for adding the ~/bundles/ path and it now doesn't matter where you have stored your appSettings so it will work for both v6 and v7 and also for anyone who has moved their appSettings to some other named file such as web.config.appSettings.config. :-)

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Dec 03, 2013 @ 08:05
    Tim Geyssens
    0

    What that is awesome Jeavon :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies