[MGNLCT-312]  (Norsu) Contenttype model with no 'name' property shows two 'title' fields in editor Created: 09/Nov/22  Updated: 10/Jan/23  Resolved: 10/Jan/23

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

Type: Bug Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Oanh Thai Hoang
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: 1.25d
Original Estimate: Not Specified

Attachments: PNG File norsu-two-titles-content.png     PNG File norsu-two-titles.png     PNG File temporary-detail-app.png    
Issue Links:
Relates
relates to MGNLCT-311 'name' property on Model is not retur... 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)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Epic Link: SaaS TPR - ContentTypes
Team: DeveloperX

 Description   

Create a content type with a model with no name property and 1 'title' property. Open the editor subapp.

Expected:

A 'name' and a 'title' property.

Actual:

Two 'title' properties.

Notes:

I'm not sure if this is something for DevX or Nucleus team.

On JCR the form shows a "Name" and a "Title" field.

So I think the two problems is that

  • Norsu is autocreating a field with the llabel "Title", whereas I expect the label to be "Name".
  • Also in the browser - it has a column named "Title" but I expect it to be "Name".

 

Details:

Interestingly I can put content in both of them - and the content is dissplayed when I oppen it again.

And interestingly - the JSON response: 

{
    "total": 1,
    "limit": 50,
    "offset": 0,
    "results": [
        {
            "@metadata": {
                "@id": "4eb86ef9-4d32-4b9e-98df-f1fcff93877d",
                "@path": "/norsu-nametest/I am the first title",
                "@name": "I am the first title"
            },
            "title": "I am the second title"
        }
    ]
} 

 

Content Model:

datasource:
  $type: norsuContentTypeDatasource
  workspace: norsu-nametest
  autoCreate: true
  
model:
  nodeType: nametest
  properties:
    title:
      label: Title
      i18n: true
      required: true
 


 Comments   
Comment by Canh Nguyen [ 16/Nov/22 ]

The problem is that the i18n message is set as Title

fields.mgnl-name.label = Title

https://git.magnolia-cms.com/projects/CLOUD/repos/norsu/browse/ui-framework-integration/src/main/resources/norsu-ui/i18n/ui-framework-norsu_en.properties#3

mgnl-name is required for node name and path. This message key "fields.mgnl-name.label" should be changed to fit the purpose of the property. We should also need a tooltip message for this field on the UI.

I also see another issue, in JCR the name should not have spaces, all spaces (and non-ASCII characters) will be converted to dash ( - ).

I think we need to move this ticket to UI framework.

Comment by Oanh Thai Hoang [ 10/Jan/23 ]

I would close this ticket is obsolete. After finalizing for name discussion and as a consequence for https://jira.magnolia-cms.com/browse/NORSU-912

This should be fixed after https://jira.magnolia-cms.com/browse/MGNLCT-311 and https://jira.magnolia-cms.com/browse/NORSU-912.  are finished.

 

Expected to see 2 fields 'name' and a 'title' are showing in norsu content detail app

A template will generate 2 fields like below

            - name: name
              i18n: false 
              $type: nameField
              required: true
            - name: title
              i18n: false 
              label: Title
              $type: textField 

A temporary content detail app will be like

 

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