Strange problem registering the controller when creating a Content App

As part of a migration from v8 to v16, I’m currently on an intermediate step of migrating to v10. I have a couple of Content Apps I’m trying to migrate. According to the documention it doesn’t look particuarly different between 8 and 10.

Anyway, I couldn’t get it to work so I tried to just implement the example word counter from the docs at: Content Apps | Umbraco CMS

I created the package.manifest, wordcounter.html and wordcounter.controller.js at /wwwroot/App_Plugins/WordCounter

No WordCounter App widget gets displayed when on any content node in the back office.

I did all the clearing of caches, hard refreshes etc. but nothing and nothing interesting in develop tools either.

Doing explicit requests for each of the files in the browser, it does serve each of those files so it seems there’s no problem there.

I’ve double and tripled checked the contents of each file match what the example docs recommend.

So I switched to C# registering of the app and yes I can get the App widget to display in the back office, however when trying to use it I just get a blank screen and the console on developer tools reveals this error:

Error: [$controller:ctrlreg] http://errors.angularjs.org/1.8.3/$controller/ctrlreg?p0=My.WordCounterAppAngular 22
angular.js:15697:16 Angular 16

So it seems for some reason it’s not registering the controller. I don’t see a deal of questions about this topic so I imagine it’s not normally much of a problem. Is there anything obvious I’m missing?

Just thought I would update this in case someone stumbles across this in the future. Probably not because it was a schoolboy error but you never know.

The package.manifest and .js files were not getting discovered because I had created the App_Plugins folder in the wrong location. I had put it in the wwwroot folder instead of the project root. Simple as that!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.