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

[v3.0] Umbraco 9 Smidge JavaScript errors with debug=false #185

Closed
leekelleher opened this issue Nov 11, 2021 · 2 comments
Closed

[v3.0] Umbraco 9 Smidge JavaScript errors with debug=false #185

leekelleher opened this issue Nov 11, 2021 · 2 comments
Labels
invalid This doesn't seem right

Comments

@leekelleher
Copy link
Owner

leekelleher commented Nov 11, 2021

Originally posted by @bjarnef in #176 (comment)

Local environment

image

Live environment

image

It seems to happen because the assets for some reason isn't registered:

image


I can see various controllers has Umbraco.Community.Contentment.Services.DevMode injected as devModeService, but I can't see where it is registered?
https://github.com/leekelleher/umbraco-contentment/blob/dev/v3.x/src/Umbraco.Community.Contentment/DataEditors/DataList/data-list.editor.js#L11-L12

Okay, it seems to be a hidden feature, which even GitHub search can't find 😅
here https://github.com/leekelleher/umbraco-contentment/blob/develop/src/Umbraco.Community.Contentment/DataEditors/_/_dev-mode.js


I think the missing registered services and controllers may be an issue with Smidge which are bundling the assets on Umbraco Cloud, but not locally. I have also noticed this started happening for my own controllers used the block custom views and this where the external login providers are missing: umbraco/Umbraco.Cloud.Issues#476 (comment)

@leekelleher
Copy link
Owner Author

Unfortunately, I haven't been able to reproduce this specific issue. I'll close the issue. Please feel free to re-open.

@bjarnef
Copy link

bjarnef commented Nov 14, 2021

@leekelleher it may not be specific related to Contentment, but it seems if Smidge fails bundling some JS/CSS assets some later JS/CSS assets may not be registered as mentioned in bergmania/Bergmania.OpenStreetMap#14

In the scenario my controllers for custom block views wasn't registered at all because of some bundle/minifying issues in OpenStreetMap v3.3.0 (which has a updated autocomplete.js asset) ... I reverted back to v3.2.0 and everything was working again.

Not sure in which order JS/CSS assets are registered - maybe in alphabetical order?

It would probably be okay to fail bundling of this asset and log the exception, but not sure if it could avoid failing bundling the other assets - in the custom controllers and in Contentment package. But I guess this is a bug or enhancement in Smidge.

@leekelleher leekelleher added the invalid This doesn't seem right label Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants