U4-10607 - Defining Umbraco 404 on GUID instead of ID

Created by Gino Bos 30 Oct 2017, 15:55:36 Updated by Gino Bos 01 Nov 2017, 08:34:34

The issue is meant as a change request.

In the current version of Umbraco it is only possible to define a custom 404 in the umbracoSettings.config by ID. In my opinion it would be better to change this to a GUID value of a content item, because the ID is not really unique. In the past it happened that the 404 page was pointing to the wrong content item, because on the staging or production environment this content item accidentally had the same id as our local 404 page. Beside this problem, it seems that the ID is not a steady value when deploying in an OTAP-enviroment or Umbraco Cloud environment. The ID seems to be different per environment, but the GUID exactly is a steady alternative.

Current way of defining the 404 1213

What did you expect to happen? 4cec7d42-f8e0-4426-b097-88bb019c5055

For more information, see the attachment. Here an example of a content item with different ID's and with the same unique GUID.

Thank you in advance,

Crix

1 Attachments

Comments

Sebastiaan Janssen 31 Oct 2017, 22:08:38

Sure, that's exactly how it works. In the umbracoSettings.config file, make sure to read the comments, you can provide an int, a GUID and an XPath statement:


1813


Gino Bos 01 Nov 2017, 08:34:34

Thank you Sebastiaan, this is exactly what i need.

I don't have the comment in the my umBracoSettings.config (in Umbraco 7.7.4 cloud version). My comment says:

Thats not really a problem, but i could not find this option in the Umbraco documentation, although i really looked for it ;-) It could be an improvement for other Umbraco users if the documentation gets updated. The documentation page where i looked is https://our.umbraco.org/Documentation/Reference/Config/umbracoSettings/.

Thank you for helping!


Priority: Normal

Type: Backlog Item

State: Closed

Assignee:

Difficulty: Normal

Category: Extensibility

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:

Sprint:

Story Points:

Cycle: