Uploaded image for project: 'Magnolia Personalization'
  1. Magnolia Personalization
  2. MGNLPN-354

Visitor trait not working properly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 1.2.10, 1.3.3, 1.4.3
    • 1.3.1, 1.4
    • None
    • Yes
    • Yes
    • Kromeriz 87
    • 21

    Description

      VisitorDetectorFilter sets the Visitor trait object as returning for the logged user and for anonymous user this value is set according to the cookie value. So basically in the end every request is returning visitor. In VisitorVoter then the cascade conditions don't allow to check only of user is logged in making this option unusable at all.

      Ideally only the selected values in the trait would be processed. Meaning that if the editor marks the checkbox for the logged user, only the logged user condition will be processed.

      Suggestions:

      • In the trait selection the options don't make much sense. It's not clear what "Registered user" should represent. Returning visitor should be added instead. Logged user and New visitor should stay.
      • The voter class should be rewritten to only process checked values. The cascade condition we are using right now doesn't allow to test the values properly in all cases (e.g. the user is always returning, this disregards the check for logged user).
      • The filter class should be reviewed. Especially the way how we handle the returning visitor setting. E.g. the user is always returning if not anonymous. That doesn't have to be true if this is the first login of the user. This part might be put in a separate protected method so developers can override it with a custom logic if needed.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                ajuran Antonín Juran
                ochytil Ondrej Chytil
                Votes:
                1 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD