If there is e.g. paragraphs with file upload field in a node, and you clone the node the reference is targeting to the same (paragraph) entity. If you edit one of these page and update file field in file paragraph and user will download/access this file. But if user try to download/access file in other cloned pages it will show "You are not authorised to access this page"

To reproduce this issue :
1. Create paragraph with file upload(e.g. File paragraph) field and add this reference to your content type
2. Create node with "File Paragraph" and upload file under it.
3. Clone your node it will create new page, under new cloned page update file field and upload new file under it and save.
4. In Cloned page if you try to download/access uploaded file it will download.
5. Check original node and try to download/access uploaded file under it, it will show you "You are not authorised to access this page"

Comments

NitinSP created an issue. See original summary.

nitinsp’s picture

Title: File pragragraph clone is not working » File pragragraph clone is not working showing "You are not authorised to access this page" error for download file
hawkeye.twolf’s picture

Note that the current behaviour, which leverages Node::createDuplicate(), creates new revisions of the existing paragraphs item, rather than creating entirely new paragraph entities on the cloned node. I'm not sure Node Clone even wants to get in the business of supporting contrib-specific entities, but at the very least there should be a giant warning on the project page and README saying,

OMG PLEASE FOR THE LOVE OF GOD, DO NOT USE THIS WITH PARAGRAPHS. I KNOW, IT LOOKS LIKE IT WORKS RIGHT NOW, BUT YOU ARE IN FOR A WORLD OF CONFUSION AND PAIN IF YOU CHOOSE TO PROCEED.

And if we do want to support Paragraphs, we could make it a sub-module.

Consider combining this issue with either of:

  1. #2875564: Paragraph ID(reference entities ID) not updated in new page after clone any page
  2. #2849377: Paragraph disappears from the original node upon deleting the clone
nitinsp’s picture

Hi derek.deraps,

Thanks for your use full reply, Is any alternate solution for node clone? If u have any idea please share.
Or Can we create node clone pragmatically with new target_id?