Locally everything works fine. But on the customer's server the code won't load the controller. There is the error message:
Error: [$controller:ctrlreg] http://errors.angularjs.org/1.8.3/$controller/ctrlreg?p0=talkingNumbersController
at umbraco-backoffice-js.js.vc7a02dd82c4a1090938c6f8a3574dc6569747a0f:25:168
at umbraco-backoffice-js.js.vc7a02dd82c4a1090938c6f8a3574dc6569747a0f:117:19
at ea (umbraco-backoffice-js.js.vc7a02dd82c4a1090938c6f8a3574dc6569747a0f:99:20)
at p (umbraco-backoffice-js.js.vc7a02dd82c4a1090938c6f8a3574dc6569747a0f:90:355)
at g (umbraco-backoffice-js.js.vc7a02dd82c4a1090938c6f8a3574dc6569747a0f:84:186)
at umbraco-backoffice-js.js.vc7a02dd82c4a1090938c6f8a3574dc6569747a0f:83:311
at Object.link (umbraco-backoffice-js.js.vc7a02dd82c4a1090938c6f8a3574dc6569747a0f:321:432)
at umbraco-backoffice-js.js.vc7a02dd82c4a1090938c6f8a3574dc6569747a0f:35:134
at Ca (umbraco-backoffice-js.js.vc7a02dd82c4a1090938c6f8a3574dc6569747a0f:108:361)
at p (umbraco-backoffice-js.js.vc7a02dd82c4a1090938c6f8a3574dc6569747a0f:92:340) `<div style="display:contents;" ng-class="{'show-validation': vm.blockEditorApi.internal.showValidation}" ng-include="api.internal.sortMode ? api.internal.sortModeView : '/App_Plugins/UmbracoBlockGrid/BlockViews/talkingnumbers.html'">`
Here is my controller:
angular.module("umbraco").controller("talkingNumbersController", function ($scope, $routeParams, contentResource, contentEditingHelper) {
// code
});
My view:
<div
ng-controller="talkingNumbersController as vm"
ng-click="block.edit()"
ng-focus="block.focus"
ng-class="['talking-numbers', model.themeClass]">
<!-- HTML -->
</div>
I found out that there is a difference between my development config and configuration on the server so I started to remove one by one difference. The module started working after removing the following configuration:
I believe the root issue comes down to caching which the debug flag effectively disables.
I'm in a hurry so cannot fully verify/vet this but the issue sounds familiar (time and time again!) and i believe that deleting /umbraco/Data/TEMP/ will do the magic.
The /DistCache specifically but, again, all from the hip on this one!
Hope it helps point in the right direction
I found what was the problem with this error. If Hosting isn't set on Debug mode, Umbraco reads file content and creates one unified file to be able to minify it. A path with a version to the end can't be read by File.IO
"~/App_Plugins/UmbracoBlockGrid/BlockControllers/talkingnumbers.controller.js?v=202308181926",
so removing ?v=202308181926 fixed the problem.
We ran into this problem as well and didn't have a version number on our controllers in the package.manifest file.
However, what did work for us was stopping the website and then deleting the Smidge\Cache folder (remove the whole cache folder), then restart the website.
Block Grid Backoffice custom View and Controller
Hi,
I've been using this article to create a custom view and a controller for a block grid module: https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/block-editor/build-custom-view-for-blocks
Locally everything works fine. But on the customer's server the code won't load the controller. There is the error message:
Here is my controller:
My view:
Package manifest:
I found out that there is a difference between my development config and configuration on the server so I started to remove one by one difference. The module started working after removing the following configuration:
There is an article that explains what the property does, but I can't figure out how to adapt my code to work if the
Debug
property isfalse
.https://docs.umbraco.com/umbraco-cms/fundamentals/code/debugging/
EDIT: The Umbraco version where the problem occurs is 12.1.1
I believe the root issue comes down to caching which the debug flag effectively disables. I'm in a hurry so cannot fully verify/vet this but the issue sounds familiar (time and time again!) and i believe that deleting
/umbraco/Data/TEMP/
will do the magic. The/DistCache
specifically but, again, all from the hip on this one! Hope it helps point in the right directionHi Damian, I've deleted the TEMP folder but it doesn't fix the issue.
I found what was the problem with this error. If Hosting isn't set on Debug mode, Umbraco reads file content and creates one unified file to be able to minify it. A path with a version to the end can't be read by File.IO
"~/App_Plugins/UmbracoBlockGrid/BlockControllers/talkingnumbers.controller.js?v=202308181926"
, so removing?v=202308181926
fixed the problem.We ran into this problem as well and didn't have a version number on our controllers in the package.manifest file.
However, what did work for us was stopping the website and then deleting the Smidge\Cache folder (remove the whole cache folder), then restart the website.
is working on a reply...