[PAGES-320] Clipboard component cannot be pasted to a page of different template than the one of the origin page Created: 29/Jul/20  Updated: 13/May/22  Resolved: 30/Sep/20

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: 5.6.4, 5.7.1, 5.7.2, 6.2.2, 6.2.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Šimon Demočko Assignee: Unassigned
Resolution: Not an issue Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: 1h 5m
Original Estimate: Not Specified

Attachments: Zip Archive test.zip     File website.type-a.yaml    
Issue Links:
Issue split
split to PAGES-355 Modify test copying component across ... Open
split from PAGES-306 Support copy / paste components betwe... Closed
Relates
relates to PAGES-314 Component templates with same name ar... 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:

 Description   

Steps to reproduce

  1. Create Text and Image component in the main area of Travel Home page
  2. Hit copy action
  3. Go to Travel about page
  4. Select main area

Expected results

Can paste the copied text and image component

Actual results

Paste action is not available

Development notes

  • If the page uses the same page template, a component can be pasted.
  • When deciding to use a different set of page templates, make sure that the component you are using is in the set of available components for the areas you'll be touching. Sometimes component templates are called the same, but are different, see PAGES-314

Definition of done

  • Turn expected into actual results
  • Also modify the current test, so it attempts to paste to a page of a different template, so the bug is covered. You'll need to add a new page template that will allow pasting the component test is copying.


 Comments   
Comment by Chris Jennings [ 14/Sep/20 ]

I believe this has been fixed in 6.2.3 by PAGES-306. I am now able to copy and paste components between pages.

Comment by Šimon Demočko [ 14/Sep/20 ]

This ticket is about sth else. I filed it as a followup for PAGES-306 b/c this case covered in retrosteps did not work w/ PAGES-306 impl. Check the details. Once the template differs, it won't paste.

Comment by Chris Jennings [ 14/Sep/20 ]

I'm afraid that's not what I'm seeing from a vanilla 6.2.3 with two light module page templates. A component created in page a, template type 1 CAN be pasted into page b, template type 2.

Your steps for the travel demo do not work online because demo.magnol.... is still running 6.2.2 currently so this is a local trial.

Comment by Šimon Demočko [ 15/Sep/20 ]

I did not try it on demo, but on a local instance on which I developed it. Nevertheless, I have a local instance running w/ 6.2.4-SNAPSHOTs now, tried the reprosteps and can still reproduce. Could you try it with the reprosteps on this page please? If it works for you with these, could you then send me your light modules config w/ reprosteps? Thanks

Comment by Chris Jennings [ 28/Sep/20 ]

Hi. Sorry for the delay but I have added a light module (test.zip) with two page templates: template-a and template-b.
Both page templates have a "main" area which can contain instances of component-a and/or component-b. A component of either type created in one page can be copied to the other.

website.type-a.yaml is a content export with the two pages pre-built.

Comment by Šimon Demočko [ 29/Sep/20 ]

Hi, I tried your sample data, thanks a lot for those! You are right, it works with them. I double-checked the repro steps we filed which still reproduce it and indeed, the Text and Image used on the two templates were coming from different sources (one is mtk T&I the other one is travel T&I) and were not considered the same, which is why it wouldn't paste. Precisely what we mentioned in development notes to avoid :facepalm:. I'll double-check with Sang since it was his QA that pointed out this problem.

We'll keep the ticket anyway to update the tests as mentioned in the acceptance criteria. Thanks again!

Comment by Šimon Demočko [ 30/Sep/20 ]

Closing as not an issue, it was not reproducible with the right steps. The original steps were incorrect because they were trying to paste a component to a template that did not accept that component (confusion arose because there was a different component allowed there with the same name). Modifying test is split to a new ticket

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