[MGNLCT-165] Type without properties results in un-extendable app Created: 21/Oct/20 Updated: 12/Jul/22 |
|
| Status: | Open |
| Project: | Content Types |
| Component/s: | None |
| Affects Version/s: | 1.1.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Chris Jennings | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| 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)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: |
| Description |
|
Magnolia supports extending content apps generated from content types. However, if I create a type with no properties, intending to set all properties via a manually configured app, my derived app has a details subapp of type ConfiguredSubAppDescriptor rather than DetailDescriptor. As the ConfiguredAubAppDescriptor has no method setForm(), my app config cannot add a form and the definitions app shows the warning: Property [form] not found in class [info.magnolia.ui.api.app.registry.ConfiguredSubAppDescriptor], property is not assigned And the resulting app offers no "Add item" or "Edit item" methods. |
| Comments |
| Comment by Christopher Zimmermann [ 22/Oct/20 ] |
|
I understand the use case here, it follows from the fact that the content type can do a lot but it cannot do all the things that you can do in a full form definition in an app. The "conenttype-centric" appraoch is that one does as much as they can in the content-type, and then simply add or override with whatever that they need via a few fine-tunings in the app file. But in some cases this would then be MORE complicated then simply defining the full form in the app definition. Or another usecase is that a developer already has a full form (maybe they had a full app that they want to simplify.) One could argue - why use a CT at all in this case? The answer is that it supplies all of the actions and subapp configuration. |
| Comment by Chris Jennings [ 23/Oct/20 ] |
|
Thank you for your input, 'Topher. |
| Comment by Thomas Duffey [ 12/Jul/22 ] |
|
Just ran into this. If you truly don't want another property you can just define the name property that is supposed to come in by default:
datasource:
workspace: stuff
namespaces:
some: https://www.curriculumassociates.com/jcr/1.0/some
autoCreate: true
model:
nodeType: some:stuff
properties:
name:
$type: textField
required: true
Note you have to re-specify the required attribute for some reason. |