Staging environment in Umbraco Cloud won't retriev...
# help-with-umbraco
j
I wrote a custom grid editor that works fine in my local env and in the development environment in Umbraco Cloud. But it doesn't work in the staging environment for some reason. I tried many tiny tweaks, clean ups and redeploys but they haven't helped so far. The Umbraco version is 13. What happens when I try to add the editor to the grid (legacy) of a document instance in staging is that the html gets fetched but no request if made for the js of the editor. Instead the backoffice UI fails to retrieve .../sb/umbraco-backoffice-extensions-js.js.v638701221941906507 which returns status 500. In the tracelog we can see: System.IO.FileNotFoundException: No such file exists /App_Plugins/NewsFeedComponentEditor/newsfeedcomponenteditor.controller.js?v=0.0.4 (mapped from /App_Plugins/NewsFeedComponentEditor/newsfeedcomponenteditor.controller.js?v=0.0.4)\r\nFile name: /App_Plugins/NewsFeedComponentEditor/newsfeedcomponenteditor.controller.js?v=0.0.4\r\n at Smidge.SmidgeFileSystem.GetRequiredFileInfo(IWebFile webfile)\r\n ... etc. Which is strange, because when I copy the path from the tracelog, I can navigate to the file in the browser and the file is returned just fine... I tried tweaking the path in the config (with tilde / without tilde etc.) and changing the version number in the package manifest, restarting etc. but these didn't help. The file is there! And it's retrievable, but for some reason Umbraco doesn't see it... Any ideas what to look out for? Thank you!
Has anyone bumped into anything like this?
k
The file name can't contain
?v=0.0.4
. That's what the URL should be. That's why you can browse to it but Smidge can't load it when bundling.
Maybe there's an URL somewhere where there should have been a file path?
Or maybe you just have
?v=0.0.4
somewhere where it shouldn't be?
The reason this works in development is that Smidge doesn't bundle backoffice JS there. All files are loaded separately.
Smidge is trying to create
umbraco-backoffice-extensions-js.js.v638701221941906507
by bundling all backoffice js & css, and when it tries to bundle your plug it thinks one of the files to bundle is
newsfeedcomponenteditor.controller.js?v=0.0.4
which I'm sure isn't correct.
j
You're exactly right, removing the query string from the file name definition was the solution to this problem! 👏 Looks like one should only consider using query strings to ensure that files update when developing... Many thanks to you and have a great weekend! ☺️
4 Views