[MGNLPN-131] VariantResolver should not be triggered in AdminMode (when authoring content) Created: 30/May/14  Updated: 22/Aug/14  Resolved: 04/Jun/14

Status: Closed
Project: Magnolia Personalization
Component/s: Integration
Affects Version/s: None
Fix Version/s: 1.0

Type: Bug Priority: Major
Reporter: Philip Mundt Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLPN-184 Switching to original of a page in pa... Closed
relation
is related to MGNLPN-139 VariantResolver should not be trigger... 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:
Epic Link: Personalisation

 Description   

Problem:

There might be situations where variant resolving might be triggered when in AdminMode (in the PageEditor or in PreviewApp without explicitly setting preview parameters). For example:

  • mainNode
    • variant-0 (trait: date=today)
    • variant-1 (trait: userAgent=Firefox) (using Firefox for preview)

In the above two cases it shouldn't be possible to edit the mainNode as variants will be resolved.

Possible solution:

  1. Prevent info.magnolia.personalization.trait.AbstractTraitDetectorFilter to set the Trait in the TraitCollector when in AdminMode.
  2. Prevent info.magnolia.personalization.filter.VariantResolverFilter to resolve variants when in AdminMode.

What is AdminMode?

  • Authoring mode, i.e. editing a page in PageEditor (EditMode)
  • Admin instance? (PreviewFilter should still work)
  • In PreviewApp we want to maintain variant resolution!

-But we don't to resolve a variation without specified parameters (e.g. opening the preview app)- This should be fixed in the follow up ticket MGNLPN-131.



 Comments   
Comment by Roman Kovařík [ 30/May/14 ]

Possible solution:

  1. Prevent info.magnolia.personalization.trait.AbstractTraitDetectorFilter to set the Trait in the TraitCollector when in AdminMode.
  2. Prevent info.magnolia.personalization.filter.VariantResolverFilter to resolve variants when in AdminMode.
  1. We cannot use simple AggregationState.isPreviewMode() since trait detector filters are executed before AggregatorFilter thus previewMode property is not yet set.
  2. I used this solution (check for preview mode) but I'm still not sure how to detect preview app (It still uses variant at this place).
Comment by Mikaël Geljić [ 04/Jun/14 ]

Currently fixed for page-editor, created followup-ticket for the preview-app case.

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