umbraco / Umbraco.UIBuilder.Issues

Back office UI builder for Umbraco
3 stars 2 forks source link

Context apps Not Loading on Production #43

Closed andyneil closed 1 year ago

andyneil commented 1 year ago

Describe the bug The context app does not load on production site. When running locally the app loads fine.

Steps To Reproduce On a production site, navigate to a context app using its icon. No visual error is shown, but one appears in the console log.

Screenshots image

image

Environment (please complete the following information):

Additional context Browser console log:

umbraco-backoffice-js.js.v638040298904548122:147 Error: [$compile:multidir] http://errors.angularjs.org/1.8.3/$compile/multidir?p0=konstruktCollectionListView&p1=%20(module%3A%20umbraco.directives)&p2=konstruktCollectionListView&p3=%20(module%3A%20umbraco.directives)&p4=template&p5=%3Cdiv%20collection-alias%3D%22tab.collection.alias%22%20open-in-infinite-editor%3D%22true%22%20show-create-button%3D%22true%22%20parent-entity-id%3D%22vm.nodeUdi%22%3E
    at umbraco-backoffice-js.js.v638040298904548122:25:168
    at ba (umbraco-backoffice-js.js.v638040298904548122:103:448)
    at aa (umbraco-backoffice-js.js.v638040298904548122:96:378)
    at umbraco-backoffice-js.js.v638040298904548122:102:238
    at umbraco-backoffice-js.js.v638040298904548122:159:454
    at m.$digest (umbraco-backoffice-js.js.v638040298904548122:171:67)
    at m.$apply (umbraco-backoffice-js.js.v638040298904548122:174:484)
    at k (umbraco-backoffice-js.js.v638040298904548122:125:445)
    at v (umbraco-backoffice-js.js.v638040298904548122:131:40)
    at y.onload (umbraco-backoffice-js.js.v638040298904548122:131:464)
mattbrailsford commented 1 year ago

So $compiler/multidir would suggest that angular is trying to apply multilple directives to the same element causing a conflict. Given it works locally, I'd initially question whether everything is deployed correctly and you don't have any old cached controllers conflicting?

andyneil commented 1 year ago

Hey @mattbrailsford - I totally erased the web app (except media folder) and re-deployed as I'd upgraded from v9 -> v10 so that I could use the latest Konstrukt as I needed to use Dictionary in Umbraco. I also re-factored to the new style of sectionBuilderConfig.WithTree("content", treeConfig => then treeConfig.AddContextApp() just in case it was the way I was adding the apps (my old method was marked obsolete)

mattbrailsford commented 1 year ago

Coming from v9 to v10, in v10 we moved to RCL's for our JS assets which means you need to remove the old App_Plugins folder, has this been removed or is that getting deployed and thus causing conflicts?

andyneil commented 1 year ago

That's absolutely the issue! The folder was checked in from the previous version but not shown in the C# project.

Thanks @mattbrailsford :)