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
JavaScript library is not included in bundle #10372
Comments
Could be that there's a minification error preventing it from being bundled? I don't know if there's logging when that happens? I'll ping @Shazwazza on this one. Does it help to turn |
I tried the debug mode and it didn't make any difference. I have made it work using the already minimized version of the file. I reckon it's something to do with the comments on the file, Client Dependency used to also have some issues with removing comments when minimizing too. |
I had the same problem, first i used the App_Plugins-folder in "root" of the project, then the backoffice-js file throws, but i copied the App_Plugins folder into wwwroot and after this it works. It like the manifest.json-file is loaded from the "root"-App_Plugins and the client files from wwwroot. |
Have you looked at this issue? I have the same problem running 9-rc2 And as @enkelmedia comments. It works if you make a copy of App_Plugins folder into wwwroot folder. The problem for me is when working with blocklist views/controllers. So the solution right now is making a copy of App_Plugins folder before deploying to the server. |
Same error here. We have a problem on our server when trying to get an extension Contentment to work. I have posted a post in the forums as well: https://our.umbraco.com/forum/using-umbraco-and-getting-started/108316-frontend-error-the-file-umbraco-backoffice-extensions-js-does-not-contain-any-reference-to-the-extension The file
But we want to keep it as Versions:
|
I'll echo the above comments - I too have JS files in APP_PLUGINS that are not being loaded if Hosting Debug is set to false, only if it is true. I've also deleted the Smidge folder and it makes no difference to the back end, and I cannot see where they are being saved (if at all) nor does it make any difference where the APP_PLUGINS folder is, root of the directory, or in the wwwroot directory. I'm using V10-RC4, but I know that the Smidge DLL's are not built by Umbraco direct. It's a pain, but now that I have found out what the issue is, at least there is a workaround, but like the above poster, I want to keep Debug=false on my live environment. |
This needs attention (still present on 9.5.2 and it's present on v10 as well), we're having to delete the smidge folder to get UmbracoForms running and having similar issues with Usync. Can we get a fix for this from someone who knows how Smidge interacts with the rest of Umbraco etc? Is it a @Shazwazza creation? Turning debug=true on is not a fix. |
Just to confirm this issue is still present in umbraco 10.0.1 |
Hey all, thanks for confirming this is still a problem for some of you. I am honestly not sure what is going on here! On Umbraco Cloud we set all projects to Additionally, it feels like some of you have different problems than others, but I can't really tell for sure. What we really need to progress this is to have reproduction steps on a clean v9/v10 install, adding some As soon as we have good reproduction steps we can look further into it, currently I am not able to proceed with reproducing. If anyone wants to attach their whole |
@nul800sebastiaan I have been able to resolve the issue. In visual studio make sure the App_Plugins folder is excluded from the project. During the publish I believe Umbrao.Core will take all the files in the App_Plugins folder, work its magic to minify it and include the files in the publish (even though they are excluded from the project) If the App_Plugins folder is included in the project they will override the files Umbraco has generated so it will then not work on the server unless Hosting is set to Debug in which case it will look for the files that have been included... That's just my theory though... who knows! but at least it is now working for me :-) Also you might need to clear the cache / hard refresh on the website to see the changes take effect I hope this helps. |
I tried the above solutions but still couldn't load the backoffice. I managed to fix it by removing any fully qualified URLs from the package.manifests. For example, https://www.gstatic.com/charts/loader.js in the following snippet. {
"dashboards": [
{
"alias": "formReports",
"view": "/App_Plugins/Reporting/FormReport/formReport.html",
"sections": [ "reporting" ],
"access": [
{ "deny": "translator" },
{ "grant": "admin" }
],
"weight": 1
}
],
"javascript": [
"/App_Plugins/Reporting/FormReport/formReportController.js",
"/App_Plugins/Reporting/FormReport/formsController.js",
"https://www.gstatic.com/charts/loader.js",
"/App_Plugins/Reporting/vendor/simple-datatables.js"
],
"css": [
"/App_Plugins/Reporting/FormReport/forms.css",
"/App_Plugins/Reporting/vendor/simple-datatables.css"
]
}
|
Experimenting in Umbraco 10.1 I found that it also exhibits the problem when runtime mode is set to Production. It appears to not be able to bundle multiple JS files that reside in a single plugin. My solution was to break out the separate JS files as separate plugins and that fixed the issue. |
We have the same problem! Is there any solution except, "debug=true" ? |
Hi again. I am not sure if this is the fix but I got a similar issue when working with UmbracoForms. (Error: $controller:ctrlreg") I fixed this on the server by deleting the "/Smidge"-folder. It contained old cache-files that did not include the new added plugin. After deleting that folder and after a page reload, Umbraco generated new cache-files, containing the new plugin. And now UmbracoForms works great! |
You should bump the Version number: https://our.umbraco.com/Documentation/Reference/Configuration/RuntimeMinificationSettings/#manually-changing-the-cache-buster-version |
@Shazwazza We've tried manually changing the cache buster version and using AppDomain / Timestamp. Any idea how to fix this? |
@Shazwazza problem is fixed by following this guide: https://dev.to/kevinjump/smidge-and-umbraco-frontends-dp1 |
Which Umbraco version are you using?
9.0.0-beta003
Bug summary
JavaScript library is not included in umbraco-backoffice-extensions-js when added through the package manifest.
Specifics
I am trying to use a js library into a new dashboard. This is how I'm including the files:
The problem I have is that the script on the 'webix-angularjs.js' file complains because 'webix' is not defined. Webix is defined in the file before 'webix.js'.
I can see that these files are concatenated by Umbraco in a custom file called 'umbraco-backoffice-extensions-js.js'.
If I inspect that file, I can see that the content of webix.js is not there, but it includes the rest of my js: webix-angularjs.js, dashboard.controller.js and dashboard.services.js
If I type 'webix' on the Dev console I can in fact see that webix is not defined.
For some reason, the file is not being bundled. Maybe the bug is on the Smidge package?
The content of webix-angularjs.js is here
The content of webix.js is here
Steps to reproduce
Add the package.manifest including the webix.js library as a dependency:
Go to the Umbraco backoffice and open the dev tools. Unders Sources, find the umbraco-backoffice-extensions-js.js.* file in the sb folder. You will see that the file doesn't contain any code.
Expected result / actual result
The webis.js file should be included in the bundled file.
The text was updated successfully, but these errors were encountered: