-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
None
-
None
-
-
Empty show more show less
-
Saigon 158, Saigon 159
-
3
The loading order of content type definitions (CTs) within one module seems unpredictable.
This leads to problems, when one CT has relations to other CTs (=> a property of a CT points to another CT), If the loading order is unfavorable.
Probably it would be more precise to say:
The Loading order of CTs and CT based apps of the same module is unpredictable, this leads to not properly "initialized" (registered) apps, if there are relations between its CTs.
However - on this ticket we should focus on CTs only.
While developing the CTs (and its apps), adding definitions step by step, one by one, there is no problem.
But on start-up of an instance with a module with multiple CTs with relations, most probably not all CTs are properly "initialized".
Work arounds
- On the running system, touch the CT def. files in the "proper" order. ... or ...
- Create distinct modules, one module with only one CT and its related (CT based) app; define load order with dependencies in module.yaml.
Example
3 CTs in one app: tourVehicle, tourGuide, tourOffices
Tour-offices may have links to both tour-vehicles and tour-guides.
The Tour-office app, when showing an item, cannot properly "resolve" / show the linked items.
(To reproduce, e.g. use https://git.magnolia-cms.com/users/cmeier/repos/content-type-examples).
See attached screenshot for not properly displayed linked items.
Discussion
1st workaround is not an option on prod. system.
2nd workaround is doable but quite a restriction.
I would prefer a solution where "the system is clever enough to load in correct order" ... if the system can figure out this ... or if the system could be instructed via config somehow ... or to quote Mika:
content-types could/should build a mini, CT-specific, dependency-graph
- relates to
-
MGNLCT-61 Reference fields to CT-retrofitted app does not work after restart
- Closed