Skip to content
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

1.9 Beta2 has broken Umbraco 6.2.5 backend #90

Closed
xumix opened this issue May 18, 2016 · 14 comments
Closed

1.9 Beta2 has broken Umbraco 6.2.5 backend #90

xumix opened this issue May 18, 2016 · 14 comments
Labels
Milestone

Comments

@xumix
Copy link

xumix commented May 18, 2016

I don't understand why, but it simply skips some of the js files in debug=false mode
For example umbracolink plugin has stopped working: if you click a node in the popup window it says setFromValue is undefined

@xumix xumix changed the title 1.9 Beta2 has broken Umbraco 6.2.6 backend 1.9 Beta2 has broken Umbraco 6.2.5 backend May 18, 2016
@Shazwazza
Copy link
Owner

anything in your umbraco logs?

@xumix
Copy link
Author

xumix commented May 18, 2016

ooops, really:

2016-05-18 16:52:01,996 [192] ERROR Umbraco.Web.UI.CdfLogger - [Thread 186] Could not write file C:\Projects\Portal\External Portal\EIIP\EIIP\umbraco_client\tinymce3\plugins\umbracolink\js\umbracolink.js contents to stream. EXCEPTION: Error: JSMIN unterminated string literal: 10

System.Exception: Error: JSMIN unterminated string literal: 10

   at ClientDependency.Core.CompositeFiles.JSMin.HandleStringLiteral() in X:\Projects\ClientDependency\ClientDependency\ClientDependency.Core\CompositeFiles\JSMin.cs:line 341
   at ClientDependency.Core.CompositeFiles.JSMin.Action(Int32 d) in X:\Projects\ClientDependency\ClientDependency\ClientDependency.Core\CompositeFiles\JSMin.cs:line 223
   at ClientDependency.Core.CompositeFiles.JSMin.ExecuteJsMin() in X:\Projects\ClientDependency\ClientDependency\ClientDependency.Core\CompositeFiles\JSMin.cs:line 192
   at ClientDependency.Core.CompositeFiles.JSMin.Minify(TextReader reader) in X:\Projects\ClientDependency\ClientDependency\ClientDependency.Core\CompositeFiles\JSMin.cs:line 97
   at ClientDependency.Core.CompositeFiles.JSMin.CompressJS(Stream stream) in X:\Projects\ClientDependency\ClientDependency\ClientDependency.Core\CompositeFiles\JSMin.cs:line 74
   at ClientDependency.Core.CompositeFiles.Providers.BaseCompositeFileProcessingProvider.MinifyFile(Stream fileStream, ClientDependencyType type) in X:\Projects\ClientDependency\ClientDependency\ClientDependency.Core\CompositeFiles\Providers\BaseCompositeFileProcessingProvider.cs:line 613
   at ClientDependency.Core.CompositeFiles.DefaultFileWriter.WriteContentToStream(BaseCompositeFileProcessingProvider provider, StreamWriter sw, Stream stream, ClientDependencyType type, HttpContextBase context, String originalUrl) in X:\Projects\ClientDependency\ClientDependency\ClientDependency.Core\CompositeFiles\DefaultFileWriter.cs:line 110
   at ClientDependency.Core.CompositeFiles.DefaultFileWriter.WriteToStream(BaseCompositeFileProcessingProvider provider, StreamWriter sw, FileInfo fi, ClientDependencyType type, String origUrl, HttpContextBase http) in X:\Projects\ClientDependency\ClientDependency\ClientDependency.Core\CompositeFiles\DefaultFileWriter.cs:line 23

@Shazwazza
Copy link
Owner

Thanks, i'll test that file and see why it's failing

@Shazwazza Shazwazza added the bug label May 18, 2016
@Shazwazza Shazwazza modified the milestones: 1.9.1, 1.9.0 May 18, 2016
@Shazwazza
Copy link
Owner

I've uploaded a new version to nuget: https://www.nuget.org/packages/ClientDependency/1.9.0-beta4

Problem was something stupid on my part when parsing JS string templates. The reason this has been in beta for a while is because I was fixing up a bunch of issues with the original JsMin. I've created a diff project to track those here: github.com/shazwazza/jsminsharp . JsMin has been great but had a few issues so I've fix a lot of it up but in the process have made a few mistakes. Should all be good now I hope! There's lots of tests created there and have tested several projects with this including the latest Umbraco.

@xumix
Copy link
Author

xumix commented May 18, 2016

So good! Thanks a lot!

@xumix
Copy link
Author

xumix commented May 19, 2016

Unfortunately, this is not the end...
2016-05-19 12 04 05 - umbraco cms - localhost - mozilla firefox
The error disappears if debug=false

@xumix
Copy link
Author

xumix commented May 19, 2016

the errors:

2016-05-19 11:57:30,106 [129] ERROR Umbraco.Web.UI.CdfLogger - [Thread 109] Could not load file contents from /umbraco/webservices/legacyAjaxCalls.asmx/js. Domain is not white-listed.
2016-05-19 11:57:30,117 [129] ERROR Umbraco.Web.UI.CdfLogger - [Thread 93] Could not load file contents from /umbraco/webservices/nodeSorter.asmx/js. Domain is not white-listed.

@xumix
Copy link
Author

xumix commented May 19, 2016

I've disabled rogue compression, and it is ok now, thanks!

@Shazwazza
Copy link
Owner

Interesting, can you send me your cdf config when you got this issue, i'm just curious to see what is in there as I wouldn't suspect the rogue compression stuff to include these requests.

@xumix
Copy link
Author

xumix commented May 19, 2016

<add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="true" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/TEMP/ClientDependency" urlType="MappedId" pathUrlFormat="{dependencyId}/{version}/{type}" />

<rogueFileCompression>
      <add path="*" compressJs="true" compressCss="true" jsExt=".js,asmx/js" cssExt=".css">
      </add>
    </rogueFileCompression>

@xumix
Copy link
Author

xumix commented May 19, 2016

bundleDomains attribute has been removed, after i've added bundleDomains="localhost" it fixed the errors

@Shazwazza
Copy link
Owner

Ah so rogue file compression by default tries to include asmx/js calls which are excluded from being detected as local static files which is why it is requiring you to white list them. Otherwise, you could remove that from the 'jsExt' attribute if you wanted to exclude those from being compressed.

@Shazwazza
Copy link
Owner

I'll remove the asmx/js from default config that we ship with

@xumix
Copy link
Author

xumix commented May 30, 2016

great! thanks

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

No branches or pull requests

2 participants