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

Delete all variants action fails when component is copied between pages

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • 2.1.7
    • None
    • None

      Steps to reproduce

      1. At demo, go to Pages app
      2. Create a Page named "mainPageA"
      3. Edit the page and within the main area, create an HTML component (text=Original). 
      4. Create a variant of that component (text=Variant)
      5. On the HTML component (variant selector of the green bar), select the "Original" which activates the "Copy item" action
      6. Copy the HTML component
      7. Now back to Pages app, on the same level than "mainPageA", create "mainPageB"
      8. Edit the page and within the main area, clic on "Paste item"
      9. The component is copied and you can check that both, Original and the Variant show the proper text message (Original and Variant)
      10. On the HTML component, at the variant selector (Green bar), select original
      11. Clic on "Delete all components variants" 
      12. Check it fails (exception attached)

      Expected results

      All variants are deleted

      Actual results

      An error is thrown

      Workaround

      Restarting the Magnolia instance fixes the problem

      Development notes

      It seems like the new page is not marked as "page with variations" (Map<String, Integer> pagesWithVariants class property inside PersonalizedPages)
      at info.magnolia.personalization.variant.PersonalizedPages when the component is copy-pasted.
      If you restart Magnolia, the index pagesWithVariants is updated and you can delete the variant.

        Acceptance criteria

              Unassigned Unassigned
              ccantalapiedra Carlos Cantalapiedra
              AuthorX
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: