enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
201 stars 34 forks source link

check allowChildContentType filter in content API #8721

Closed rymsha closed 3 years ago

rymsha commented 3 years ago

8720 provides a front-end filtering for allowChildContentType

Validate new content create and move actions based on allowChildContentType

Key differences:

rymsha commented 3 years ago

Move Content API checks

So it is possible to move template-folder and page-template anywhere. Is it by design or a bug?

Create Content API checks

So it is possible to create content in parent with allowChildContent = false. It seems like a bug. (correction: the check is in populateParentPath) Even more: if parent allowChildContent = false and parent is page-template, nearest site is looked-up (it is usually fast in this case, just two steps, but sometimes fails), to substitute parentPath with nearest site's path. https://github.com/enonic/xp/issues/4820

rymsha commented 3 years ago

page-template should allowChildContent = true but allowChildContentType = media:* and portal:fragment such content should go under page-template itself, not under site

rymsha commented 3 years ago

if content-type is currently unavailable assume it allows any child content type

rymsha commented 3 years ago

So it is possible to move template-folder and page-template anywhere. Is it by design or a bug?

Bug or not, logic gets changed: now create and move share the same parent-child relationships verification.