[MGNLCT-175] Auto initialize content type datasource root path Created: 31/May/21  Updated: 08/Dec/23

Status: Accepted
Project: Content Types
Component/s: None
Affects Version/s: 1.2
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Canh Nguyen Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: VN-Implementation, headless-team-support
Remaining Estimate: Not Specified
Time Spent: 1.25d
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-6704 datasource-rootPath is ignored when s... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

When a content type is configured datasource root path, if the root path is not existed then it will be created automatically.



 Comments   
Comment by Roman Kovařík [ 31/May/21 ]

Is datasource rootPath something common?

 

Comment by Christopher Zimmermann [ 02/Jun/21 ]

Mapping to a subpath may not be common, but it is a good usecase. For example different sites could be accessing content at different root nodes.

Comment by Christopher Zimmermann [ 02/Jun/21 ]

We should not commit this without further consideration. It is likely that contenttype based apps will soon support multiple node types and that they can be in a heirarchyu such as country > state > store. So a rootPath may not be a folder type.

In general it seems creating content "implicitly" is risky and could be unexpected.

Comment by Mikaël Geljić [ 07/Jun/21 ]

Not sure about mixing this with hierarchical types, as each entry becomes a content item and none has to exist initially, hence none of them would be the root-path. Folder is a reasonable assumption. iirc my case with magnolia-pd subscription was actually mirroring the travel-demo setup re: tour-types & destinations.

Coupling this with autoCreate = true makes sense to me, if content-type B requires its own folder, let it be autoCreate as well (only one needs to create the workspace, that's fine).

For extra flexibility, wouldn't mind a rootNodeType under the datasource definition if we must?

Comment by Christopher Zimmermann [ 05/Apr/22 ]

Parking this one for now as it is not an immediate concern.

Generated at Mon Feb 12 00:37:52 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.