[MGNLDEMO-154] Hidden circular-dependency between travel-demo and tours module might cause trouble Created: 30/Mar/16  Updated: 12/Apr/16  Resolved: 12/Apr/16

Status: Closed
Project: Magnolia Demo Projects
Component/s: magnolia-travels
Affects Version/s: 0.10
Fix Version/s: 0.11

Type: Bug Priority: Neutral
Reporter: Philip Mundt Assignee: Ilgun Ilgun
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.5d
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLDEMO-157 Update travel-demo decorations to use... Closed
dependency
depends upon MAGNOLIA-6628 Improve file path for decoration Closed
relation
is related to MGNLDEMO-155 Decouple travel-demo from tours 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:
Sprint: Basel 38
Story Points: 3

 Description   

tours module is rightly depending on the travel-demo module. This enables users to install travel-demo only, without having to install the tours module. The aim is to also showcase project and module setups.

However, page template home of travel-demo (see travel-demo/templates/pages/home.yaml) defines component availability of components that are only brought in by the tours module, such as:

areas:
  main:
    type: list
    availableComponents:
      tourCarousel:
        id: tours:components/tourCarousel
      tourTypeTeaserRow:
        id: tours:components/tourTypeTeaserRow
      # ...
      tourList:
        id: tours:components/tourList
      # ...

This results in an implicit circular dependency that needs to be resolved – even though it might not result in actual errors when adding components to that page (not yet tested).

Possible solution

Fix by using decoration.



 Comments   
Comment by Philip Mundt [ 05/Apr/16 ]

Unfortunately, there is more: page /travel/about/careers.html contains contents (all six? assets in the image gallery) from the tour module but unfortunately the contents are bootstrapped by the travel-demo module, causing exception when tours module is not installed.

2016-04-05 08:39:17,264 WARN  ia.dam.templating.functions.DamTemplatingFunctions: The following ItemKey 'jcr:5843f97c-a825-40af-855b-f02483c6f354' generated exceptions when trying to retrieve the associated Item : No Asset found for ItemKey <info.magnolia.dam.api.ItemKey@9d2f7acb>
2016-04-05 08:39:17,264 WARN  ia.dam.templating.functions.DamTemplatingFunctions: Trying to get asset with item key jcr:5843f97c-a825-40af-855b-f02483c6f354 returned null.

I guess those contents (the whole gallery) should be bootstrapped by the tours module, the tricky bit being ordering the sub-node appropriately after clean install/update. When updating the deltas, please also make sure to bump all delta of all modules (see https://git.magnolia-cms.com/projects/MODULES/repos/demo-projects/commits/58f37d59dea8488877e36a2527a711723a320c1b for similar commit)!

Ideally, we should check there are no similar issue left.

Initial fix works and can be considered QAd!

See MGNLDEMO-155.

Comment by Christopher Zimmermann [ 12/Apr/16 ]

Needs to be updated to reflect changes in linked https://jira.magnolia-cms.com/browse/MAGNOLIA-6628

Comment by Christopher Zimmermann [ 12/Apr/16 ]

Leaving this closed and opening new ticket.

Generated at Mon Feb 12 05:16:51 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.