Baffled with custom content-app
s
I have created a custom content app, it basically displays algolia information inside of it - but the internals are somewhat irrelevant. This works flawlessly on my local machine, in my QA environment - however, when deploying to a UAT environment (which is the same configuration as QA) the content app fails to register the controller: Other items, such as custom dashboard and property editors are loading. The error message is a bit ambiguous, but I can't figure out whether this is me (application) or platform (azure) or Umbraco. 10.6.0 Any thoughts/ideas of where to look?
d
Hi there! I've had similar experiences due to minification settings. I know that smidge sometimes fails to minify certain javascript files if they are built using your own buildtools like vite or webpack. In any case, do you happen to see any smidge related errors in your logs? That's usually the first thing I check when I get this error.
s
No, none 😦
No build tools here 😦
a
Is it the exact same config @Sean Thorne ? Not running on Linux for example (Linux is case sensitive)
s
1:1 ~ no differences 😦
I've confirmed the files are there also
Deleted the /Smidge folder and it worked...
Now I guess the question is, do I need to do something to stop any changes to this app not being propogated because of smidge?
a
What setting you have your smidge on, perhaps it only triggers a refresh of the cache on app restart ?
s
I was refreshing the app (and restarting in azure) quite frequently - it has default settings.
k
When you go into production, all of the app plugin scripts will be merged into one big javascript file, this can mean that you might see conflicts between function names, variables etc, if two or more plugins have the same names. also if something goes wrong (missing ';' or something) in one plugin the error can 'bleed' into another one. the recommendation (well my reconmendation anyway) is to isolate your plugin code. that is wrap it in a function.
Copy code
json
(function() {
    'use strict'

     // your code goes here

})(); // those last two brackets i always miss.
that way your variables, etc won't be poluted by other pluging when its all merged for example you can see this with any of the uSync js files - https://github.com/KevinJump/uSync/blob/v12/main/uSync.Backoffice.Assets/App_Plugins/uSync/settings/expansion.controller.js
if you are still having trouble you can tell umbraco that your package should be bundled independently. https://docs.umbraco.com/umbraco-cms/extending/property-editors/package-manifest#bundling
s
@UMB.FYI tip
70 Views