[MGNLPN-710] Delete all variants action fails when component is copied between pages Created: 26/Jan/23  Updated: 16/Oct/23

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

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

Attachments: Text File error-log.txt    
Issue Links:
Problem/Incident
Relates
relates to MGNLPN-682 Removing a variant on a copied or imp... Open
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: AuthorX Support
Team: AuthorX

 Description   

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.



 Comments   
Comment by CysNET Software [ 29/Jun/23 ]

Hi:

Any updates about this? Our client is asking us for a solution

Regards,

Gabri

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