Problem/Motivation

Sometimes paragraphs referenced in an entity which is the default revision do not get saved as a default revision.
This can be specially problematic if the site is using Entity Reference Revisions fields for the paragraphs.

Proposed resolution

Update ContentEntityStorageTrait and force all paragraph entities to be a default revision when then host/parent is.

Remaining tasks

Do it.

User interface changes

None.

API changes

None

Data model changes

None

Comments

Manuel Garcia created an issue. See original summary.

manuel garcia’s picture

Status: Active » Needs review
StatusFileSize
new984 bytes

Status: Needs review » Needs work

The last submitted patch, 2: 2993851-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

  • jeqq committed 540c922 on 8.x-1.x
    Revert "Issue #2993851 by Manuel Garcia: Paragraphs who's parent is the...
  • jeqq committed 64eb24d on 8.x-1.x authored by Manuel Garcia
    Issue #2993851 by Manuel Garcia: Paragraphs who's parent is the default...
rynebl’s picture

A Patch for a problem I was facing when paragraphs were attached and multiversion is being used.

rynebl’s picture

axicdv’s picture

StatusFileSize
new1.25 KB

When a duplicate paragraph is created (method createDuplicate), the RevisionItem of the _rev field is not reset. For such paragraphs, it is impossible to get a default revision.

axicdv’s picture

Status: Needs work » Needs review
l0ke’s picture

Status: Needs review » Reviewed & tested by the community

In my opinion #7 should be a proper way to handle.
I didn't find another case when paragraphs aren't saved as a default revision except for the usage of createDuplicate() method. Particular case for it is usage of paragraphs_library submodule.

  • jeqq committed fc90cb1 on 8.x-1.x authored by axicdv
    Issue #2993851 by axicdv, l0ke: Paragraphs who's parent is the default...
jeqq’s picture

Status: Reviewed & tested by the community » Fixed

Thank you!

jeqq’s picture

Status: Fixed » Closed (fixed)

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