Problem/Motivation

When adding an existing section/template on a page, it may crash if it contains a paragraph that does not exist.

Steps to reproduce

  1. Create a inline block type with a paragraph reference field.
  2. Create a page, edit layout, add a section with the block and some paragraph.
  3. Save the section or the page template into the library.
  4. Delete the source page.
  5. Try to add the saved section/template on another page.

Proposed resolution

Add a condition to clone paragraphs if they exist in the database.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

franknoel created an issue. See original summary.

franknoel’s picture

Assigned: franknoel » Unassigned
Status: Needs work » Needs review
StatusFileSize
new896 bytes
roshanibhangale’s picture

StatusFileSize
new41.03 KB
new38.36 KB
new42.34 KB

Hi

I have tested this on drupal 10 and followed the below steps:

  • Create a inline block type with a paragraph reference field.
  • Create a page, edit layout, add a section with the block and some paragraph.
  • Save the section or the page template into the library.
  • Delete the source page.
  • Try to add the saved section/template on another page.

After applying patch successfully, observed that even if the main page source is deleted able to add the saved section into the other page.

Hence this can be moved to RTBC+1. Attaching the screenshot for the reference

Keeping the ticekt in the Needs review for code review.

jastraat made their first commit to this issue’s fork.

  • jastraat committed 00ad673a on 2.0.x
    Issue #3532370 by jastraat, franknoel: Paragraph cloning fails of the...
jastraat’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.