AndyButland/UmbracoPersonalisationGroupsCore

Criteria 404 error in Umbraco 13

tudor7gheorghiu opened this issue · 3 comments

I am currently seeing this issue when opening a personalisation group node as per screenshot. I can see where the error happens in the /App_plugins/ Angular code but can't figure a way around it. I'm also aware of this issue [https://github.com//issues/12 ] and I made the code change but still no luck and also installed the latest nuget package. Any ideas on what may cause this? Please let me know I can provide any more details.
image (3)

I'm not sure I'm afraid. Probably worth double-checking you do have the necessary code in your start-up file (as linked from the issue you have linked) and to be 100% sure you don't have anything cached in the backoffice (via this method).

Found a fix for this - which doesn't totally make sense for me - but changing the order of the endpoints registration as per the screenshot below in the Startup.cs fixed it for me. This has been tested on both local and server environments so the issue could be closed, but it would be interesting to understand why this fix worked. Thanks for your reply!
Screenshot 2024-04-10 at 10 44 02

Not 100% sure why that would resolve it to be honest, but I guess it's good for you if it does. Just to check, I did a clean install with the latest versions of Umbraco and the package, as follows, and didn't find any issues with the backoffice functionality.

dotnet new install Umbraco.Templates::13.2.2
dotnet new umbraco --name TestProject
cd .\TestProject\
dotnet add package UmbracoPersonalisationGroups --version 3.2.10
code .

I modified Program.cs to setup the package. At some point I'll add a "composer" to do this, but for now these are the necessary steps:

  • Added using statement for Our.Umbraco.PersonalisationGroups.Core
  • Added .AddPersonalisationGroups(builder.Configuration) just before Build() in the chained methods from builder.CreateUmbracoBuilder()
  • Added u.UsePersonalisationGroupsEndpoints(); into .WithEndpoints().
dotnet run

Completed the installer with default options.

Created a simple personalisation group and published without any issues.


Given the above, and you have something working, I'll close this issue now.