Hello !
I’m currently running Umbraco 13.8.0 with Umbraco Forms 13.5.0 in a Dockerized environment using .NET 8.
I get this error when I access the Form tab in the backoffice :
umbraco-backoffice-js.js.v638864548258708437:147 Error: [$controller:ctrlreg] http://errors.angularjs.org/1.8.3/$controller/ctrlreg?p0=UmbracoForms.Editors.Form.CreateController at umbraco-backoffice-js.js.v638864548258708437:25:168 at umbraco-backoffice-js.js.v638864548258708437:117:19 at ea (umbraco-backoffice-js.js.v638864548258708437:99:20) at p (umbraco-backoffice-js.js.v638864548258708437:90:355) at g (umbraco-backoffice-js.js.v638864548258708437:84:186) at umbraco-backoffice-js.js.v638864548258708437:83:311 at Object.link (umbraco-backoffice-js.js.v638864548258708437:321:432) at umbraco-backoffice-js.js.v638864548258708437:35:134 at Ca (umbraco-backoffice-js.js.v638864548258708437:108:361) at p (umbraco-backoffice-js.js.v638864548258708437:92:340) '<div class="umb-modalcolumn-body" ng-include="view">'
The backoffice renders:
I suspect this is related to Angular not finding the controller because it’s not bundled properly in production. I attempted the following without success:
- Deleted
/wwwroot/Smidge
- Disabled minification using
RuntimeMinification
options inappsettings.Staging.json
:
"RuntimeMinification": {
"useInMemoryCache": false,
"cacheBuster": "AppDomain"
}
Eventually, I realized that when Debug=true
in Hosting
config, everything works but obviously that’s not a valid solution for production.
I’ve tried looking for solutions in forums, but I haven’t really found any that work.
Has anyone ever had this problem?
My Dockerfile is very basic :
# Use the official .NET 8 SDK image and set start directory as /src (create it if it doesn't exist)
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
# Copy everything from our src/Web folder (host machine) inside the current directory of the container (/src)
COPY ./src/Web/ ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release and output it to /app/publish in the container
RUN dotnet publish -c Release -o /app/publish
# Build runtime image and set start directory as /app
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS runtime
WORKDIR /app
# Copy the published output from the build image to the runtime image
COPY --from=build /app/publish .
# Set the entry point to the Web.dll of the runtime image
ENTRYPOINT ["dotnet", "Web.dll"]
Many thanks in advance!