[MGNLPN-714] Inherited personalized component from parent page is not displayed correctly Created: 08/May/23  Updated: 22/Aug/23

Status: Open
Project: Magnolia Personalization
Component/s: None
Affects Version/s: 2.1.8
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Unassigned
Resolution: Unresolved Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File config.server.filters.forward.yaml     XML File scripts.my(1).xml     XML File scripts.my.xml     File website.travel.test-1.yaml     File www_screencapture_com_2023-5-7_19_42.mp4    
Issue Links:
Problem/Incident
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
[X]* Affected version filled
Date of First Response:
Epic Link: AuthorX Support
Team: AuthorX

 Description   

Description

This issue happens when you have a child page with a component inherited which has a variant. E.g, at travel page (root page), we define the Footer with some links (Youtube, Pinterest...) and this whole footer area is inherited by any /travel page child. This kind of component variant inheritance resolution fails when Magnolia performs a FORWARD request. For rest of cases, it works as expected: no FORWARD is performed or, instead of it, a REDIRECT is executed.

Steps to reproduce

  1. Go to demo author and login
  2. Edit /travel page
  3. Go to footer (Links section) and add cookie variant (Basel) in YouTube icon.
  4. Hide the original component so only if the cookie is present, the YouTube icon will be displayed
  5. Publish /travel page.
  6. Within the pages-app, import the website.travel.test (1).yaml file as subpage of travel page (this page simply has different titles for EN and DE)
  7. Publish Test page
  8. Go to Groovy app and import scripts.my(1).xml (there is updated code to contain /travel/ in all paths)
  9. Publish the full folder hierachy
  10. Go to Configuration app and within the filter chain, import config.server.filters.forward.yaml
  11. Publish the filter
  12. Login magonliaPublic
  13. Go to /server/filters and move the forwards filter before login filter
  14. Edit the class but do not touch anything, this will produce the filter chain to reload and the filter will be working (otherwise, the filter won't be executed)
  15. Logout everywhere (author and public)
  16. Open incognito https://demopublic.magnolia-cms.com/travel/test.html (forward filter will forward to /de/travel/test) so in tab we will see the title_de
    • At the moment there is no cookie weatherLocality so you won't be able to see YouTube icon. (OK)
  17. Open other incognito mode

Expected results

The variants works as expected (Youtube icon is shown/displayed) depending on the weatherLocality cookie value.

Actual results

Looks like the first request configuration is always served

Workaround

N/A

Development notes

If no FORWARD request is performed, then the inheritance works perfect. If the filter is changed to perform a sendRedirect instead of a forward request, it also works smoothly.


Generated at Mon Feb 12 06:40:21 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.