Issue Bug Closed

#91438SiteAccessorTrait is too strict, when resolved record is not part of a site

Helmut Hummel 05/19/20, 11:55 updated 05/19/20, 15:46

Description

When saving a reocrd on a page that is not part of a site, the slug field of this record,
despite being set to “uniqueInSite” is not checked for uniqueness, as it is assumed unique enough.

The SiteAccessorTrait in contrast to that, declares such record not part of the current site.

Both parts though must always behave the same and make the same assumptions.

In the future, we should throw a warning or at least a notice for such case. Records with slugs defined as “uniqueInSite“
must never be stored outside a site. It does not make any sense to do so.
Instead configuration needs to be adapted to either “unique” or even empty, whatever fits the use case.

Reviews 2