Details
-
Bug
-
Resolution: Unresolved
-
Neutral
-
None
-
2.1.8
-
None
-
None
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
- Go to demo author and login
- Edit /travel page
- Go to footer (Links section) and add cookie variant (Basel) in YouTube icon.
- Hide the original component so only if the cookie is present, the YouTube icon will be displayed
- Publish /travel page.
- 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)
- Publish Test page
- Go to Groovy app and import scripts.my(1).xml (there is updated code to contain /travel/ in all paths)
- Publish the full folder hierachy
- Go to Configuration app and within the filter chain, import config.server.filters.forward.yaml
- Publish the filter
- Login magonliaPublic
- Go to /server/filters and move the forwards filter before login filter
- 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)
- Logout everywhere (author and public)
- 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)
- Set weatherLocality cookie to Basel.
- Request again https://demopublic.magnolia-cms.com/travel/test.html
- Expected behavior is to see YouTube icon which is not the case (KO)
- Set weatherLocality cookie to Basel.
- At the moment there is no cookie weatherLocality so you won't be able to see YouTube icon. (OK)
- Open other incognito mode
- set weatherLocality cookie to Basel.
- Request https://demopublic.magnolia-cms.com/travel/test.html
- Expected behavior is to see 'Title DE' in in tab and the YouTube icon (OK).
- Update cookie value (ex. Basel0)
- Request again https://demopublic.magnolia-cms.com/travel/test.html
- Expected behavior is NOT to see YouTube icon which is not the case (KO)
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.