[MGNLCT-171] CT-based apps' names way too related to content type names Created: 22/Jan/21  Updated: 25/Mar/22

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

Type: Bug Priority: Neutral
Reporter: Martin Drápela Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2021-01-22-15-45-30-164.png     PNG File image-2021-01-22-15-46-27-231.png     PNG File image-2021-01-22-15-47-35-648.png     PNG File image-2021-01-22-15-48-46-841.png     PNG File image-2021-01-22-15-50-20-625.png     PNG File image-2021-01-26-11-17-11-839.png     PNG File image-2021-01-26-13-31-16-369.png     PNG File pluralCT-pluralApp.png     PNG File singularCT-pluralApp.png     PNG File singularCT-pluralAppWithAppName.png     Zip Archive sinplu.zip    
Issue Links:
Problem/Incident
causes MGNLCT-172 DOC: Add the name property to the roo... Selected
is caused by MGNLCT-169 DOC: Document that contenttype names ... 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:
[X]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Steps to reproduce

  1.  In this version of a light module - in the withAuthorCatalog branch, all works perfectly, despite both CT name is in plural: "authors.yaml"

(https://git.magnolia-cms.com/projects/DOCUMENTATION/repos/bookshelf/raw/contentTypes/authors.yaml?at=7150e9633569d59218af19b053e3b6eda6754906)

and the app's name is in plural as well: "authors.yaml"

https://git.magnolia-cms.com/projects/DOCUMENTATION/repos/bookshelf/raw/apps/authors.yaml?at=fa77ec65b42fe085ee9b66992d1f346ca794919f

After following the best practice to have content type names in singular (MGNLCT-169 DOCS: Document that contenttype names should be singular),
the content type name was changed to singular, tha app name was left in plural:

https://git.magnolia-cms.com/projects/DOCUMENTATION/repos/bookshelf/commits/bfe90421ec6c5792daddf083eab3a18e15cfd261

and after installing the module, curiously, one can open the "author" app:


despite the plural in the yaml file: 

The app works:

but one cannot edit any item in it:

because the edit actions are bound with the singular form of the app:

Expected results

Renaming content type name should not affect app name and its actions.

Actual results

Workaround

Development notes



 Comments   
Comment by Martin Drápela [ 26/Jan/21 ]

Another try with a very special empty LM: sinplu.zip

Initial state: both CT and app have the same name - "plural" and are registered as follows:

After
1) renaming the CT "plural.yaml" to "singular.yaml"

2) providing a correct reference to the renamed CT in the app descriptor, the new content type name "singular" gets propagated into the appName nodes of actions, which then produces the NoSuchDefinitionException:

 

Comment by Martin Drápela [ 26/Jan/21 ]

Workaround (to be documented)

Set app name in the app descriptor, e.g.

!content-type:singular
icon: icon-people
name: plural

Results in correct action names:

 

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