[MAGNOLIA-7483] Definitions in registry that is using nameAsId are not unregistered when definition name changes Created: 06/Sep/18  Updated: 23/Mar/21  Resolved: 18/Mar/21

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 6.0
Fix Version/s: 6.2.7

Type: Bug Priority: Critical
Reporter: Christopher Zimmermann Assignee: Canh Nguyen
Resolution: Fixed Votes: 1
Labels: VN-Implementation
Remaining Estimate: 0d
Time Spent: 3.5d
Original Estimate: Not Specified

Issue Links:
Git Code Review
git code review opened MAGNOLIA-8033 Rename yaml content app files causes ... Open
Relates
relates to MGNLCT-92 Apps are registered twice when changi... Closed
relates to MAGNOLIA-7271 Deprecation can't be applied at runtime Accepted
relates to MGNLUI-4620 Configure that apps are automatically... Closed
relates to CFGUI-75 Action to reload the definitions in t... Closed
duplicate
is duplicated by MGNLUI-4528 App instance is duplicated when chang... Closed
is duplicated by MGNLUI-6113 An update in m5 content type app defi... Closed
relation
is related to MGNLUI-4256 App launcher layout update should be ... Accepted
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: Content Types phase 2
Sprint: Features 7, Features 8, Features 9, Features 10, HL & LD 23, HL & LD 24
Story Points: 8

 Description   

When the "defaultGroup" is configured on the app launcher (as documented https://documentation.magnolia-cms.com/display/DOCS57/App+launcher+layout), then CT generated apps are displayed twice in the app launcher.

Furthermore, after opening one of the tiles and closing the app again, the tile remains hilighted.

I am not sure if this only happens with CT generated apps - or with any kind of app.

The app shows up twice in the Definitions app, but if you click on the first one, the second one is selected. 

This can happen very easily because when you first create the app file, even with no contents in the file - the first app is created, as a name for the app, the filename of the app yaml file is used. When you then enter a different name property, you already have two apps.

To reproduce:

  • Create a CT and an app.
  • See the app in the app launcher.
  • Change the "name" property" in the app.
    • (If the app had no name property - and then you add a name propertly that is different then the filename - this also causes the problem.)
  • Logout and in again.
  • Note that the app shows up TWICE in the app launcher.
  • Only a restart appears to solve the problem.

 

 

All registries that are using nameAsId strategy are affected by this issue.

When definition name changes, old defition is not removed from the registry. Leaked definitions stay in the registry until restart.



 Comments   
Comment by Christopher Zimmermann [ 13/Dec/18 ]

Verified on 6.0 and added steps to reproduce.

Comment by Christopher Zimmermann [ 15/Jan/19 ]

rsiska I see this is "in progress" but not in a sprint. Is it really In progress?

Comment by Christopher Zimmermann [ 15/Jan/19 ]

Could this ticket be related? https://jira.magnolia-cms.com/browse/MGNLUI-4256

 

Comment by Christopher Zimmermann [ 12/Feb/19 ]

Jaroslav says he had the same problem when he changed the value of the !with-type tag in an app definiton.

Comment by Christopher Zimmermann [ 13/May/19 ]

Could there be an action in the definitions app "Reload all definitions" which would clear the registries and rebuild them?

Comment by Canh Nguyen [ 18/Mar/21 ]

The solution to fix this issue is that when registering an app, if there's an app with the same definition location will be unregistered then it registers the new app.

Comment by Christopher Zimmermann [ 18/Mar/21 ]

So the case in the description does not happen anymore? If i rename an app, the app is properly renamed and only shows up once in the app launcher?

Comment by Canh Nguyen [ 18/Mar/21 ]

Yes, the app launcher only shows once new name.

Generated at Mon Feb 12 04:24:11 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.