- Issue created by @phenaproxima
- Assigned to lauriii
- Status changed to Postponed: needs info
20 days ago 2:18pm 28 July 2025 - 🇺🇸United States effulgentsia
The assumption the way this issue is worded is that XB should only allow content templates for entity types and bundles for which XB will be able to allow editing individual entities of. For example, only entity types that implement
EntityPublishedInterface
. But I wonder if that's correct, so assigning to @lauriii. Because another way we can go here is to allow content templates for all entity types and bundles, even ones for which editing the individual entities can only be done outside of XB. For example, we could release XB 1.0.0 with the ability to edit content templates for nodes but not yet the ability to edit the individual nodes within XB. And if we can do that for nodes, then why not for content entity types that XB might never provide the ability to edit the individual entities of? - 🇺🇸United States effulgentsia
Also, what might make sense here is for XB 1.0.0 to only allow content templates for nodes, and punt any support for creating templates for other entity types (e.g., paragraphs, custom blocks, etc.) to after 1.0.0.
- 🇫🇮Finland lauriii Finland
I agree that
EntityPublishedInterface
seems indeed like a restriction for editing entity content in XB, not to build templates for the entity. I'm wondering if relying on the existence ofview_builder
for the entity type would be too broad? - 🇫🇮Finland lauriii Finland
Content Templates is still a priority for stable, but we're tracking it separately.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Also, what might make sense here is for XB 1.0.0 to only allow content templates for nodes, and punt any support for creating templates for other entity types (e.g., paragraphs, custom blocks, etc.) to after 1.0.0.
+1 — this is what I was thinking. Assuming we do that, I agree with removing the tag, if we first land a basic MR here that does this:
diff --git a/config/schema/experience_builder.schema.yml b/config/schema/experience_builder.schema.yml index 6e2c4c78f..7aa46c156 100644 --- a/config/schema/experience_builder.schema.yml +++ b/config/schema/experience_builder.schema.yml @@ -718,6 +718,8 @@ experience_builder.content_template.*.*.*: PluginExists: manager: entity_type.manager interface: Drupal\Core\Entity\ContentEntityInterface + Choice: + - node content_entity_type_bundle: type: string label: 'Bundle'
(And then keep the issue open for the wider scope.)
- Merge request !1432Resolve #3518272 "1 dot oh node content templates only" → (Merged) created by wim leers
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
MR up for #7. Assigned to @lauriii for review — if he approves/merges, then I'm happy to remove the tag 👍
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Adjusting title temporarily for the MR up for review in #9. Once it's in, we should restore the title
[PP-1] Validate that content templates are attached to content entity types (+ bundles) that fulfill XB's requirements
. - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Hah, the tests are failing legitimately:
Drupal\Tests\experience_builder\Functional\Update\CollapseComponentInputsUpdateTest::testCollapseInputs Violations exist for Content template xb_page.xb_page.reverse: content_entity_type_id: The value you selected is not a valid choice. Failed asserting that actual size 1 matches expected size 0.
This is because 📌 Don't allow passing uncollapsed inputs if using default expression Active just introduced a
ContentTemplate
forxb_page
— whereasxb_page
content entities should never get content templates, because they're explicitly intended for one-off (landing) pages! 😅 This just reaffirms my belief we should strictly validate config. -
wim leers →
committed 843e7b0b on 1.x
Issue #3518272 by wim leers, lauriii, effulgentsia: Initially, only...
-
wim leers →
committed 843e7b0b on 1.x
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Because another way we can go here is to allow content templates for all entity types and bundles, even ones for which editing the individual entities can only be done outside of XB.
That'd mean a very bifurcated experience: some things can be edited in XB, some things cannot, etc. It also means going back to the usability reality that has frequently been lamented: being forced to navigate a complex, abstract admin UI where the connections between concepts are hard to discover and hence require a steep learning curve.
We might need to do this eventually to bring support for the full suite of content entity types in Drupal core & contrib. But … I don't think that's necessary at this time. I would urge to pretty please do this in a multi-phased approach:
- no content template support (the reality in https://www.drupal.org/project/experience_builder/releases/0.7.3-alpha1 → )
node
content template support (see #7 and its MR)Yes, @lauriii is right in #5 that
EntityPublishedInterface
is about the content entity editing experience, because XB's current auto-save architecture needs the ability to publish (to work at all).While we may very well be targeting only the "pure"
ContentTemplate
part for 1.0/DrupalCon Vienna,Once that's the case, it'll also be reasonable to expect that the "navigator" in the top bar allows searching not only
Page
content entities, but any content that can be created or edited in XB, so also for example nodes. And so on and so on. Which is exactly why the list of eligibility criteria in 📌 Allow XB to be used on all node types Active is what it is.