Closed rymsha closed 3 years ago
Move Content API checks
allowChildContent
on destination parent is trueSo it is possible to move template-folder
and page-template
anywhere. Is it by design or a bug?
Create Content API checks
template-folder
is created in site
parentpage-template
is created in template-folder
parentSo 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
page-template should allowChildContent = true
but allowChildContentType = media:* and portal:fragment
such content should go under page-template itself, not under site
if content-type is currently unavailable assume it allows any child content type
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.
allow-child-content
is respected for both create and move operationsallow-child-content-type
respected for both create and move operations
8720 provides a front-end filtering for
allowChildContentType
Validate new content create and move actions based on
allowChildContentType
Key differences:
allowNewContent
should not be checked. (Create Content API already prevents "abstract" content)media
content types, validation should allow them in root and normal content (by default)