Ticket #9919 (closed Bug: fixed)

Opened 4 years ago

Last modified 3 months ago

ATContentTypes fails to paste relatedItems and ATPathCriterion, missing schema property

Reported by: mircoangelini Owned by: seanupton
Priority: major Milestone: 4.x
Component: General Version: 4.3
Keywords: Cc: grahamperrin@…

Description (last modified by seanupton) (diff)

Problem

Products.Archetypes introduced per #5180 a 'keepReferencesOnCopy' flag/propety for schema, along with a check for said property in Referenceable.manage_afterAdd. ATContentTypes uses ReferenceField in two places (path criterion, relatedItems field) where this flag is not included. Fast-forward five years, this is still a problem that requires a simple solution of opting-into this property in the respective schema in ATCT.

Reproducing

...with relatedItems

  • Create a page with one or more related objects.
  • Copy and paste the page.

The new page will be missing the object(s) related.

With old-style collections / topics

Most Plone 4.2 sites still need to use old-style collections for lack of key features in plone.app.collection, so this is still a worthy priority fix to get into a 4.3.x release.

  • Create a topic (old-style collection), add a path criterion ("Location in site"); choose a specific path.
  • Copy the collection/topic and paste elsewhere.

The criterion will be copied, but not the reference.

Notes

  • This was originally reported affecting Plone 3.2.1, but it continues to affect Plone through ~4.3 (as of 2013-03-04).

Change History

comment:1 Changed 4 years ago by keul

The same on the current trunk 3.3.x

comment:2 Changed 4 years ago by grahamperrin

  • Cc grahamperrin@… added

A highlight from  http://n2.nabble.com/-tp357275p357280.html

a variation on object_paste.cpy. In this case it pastes objects and sets the old object as a related item on the new object.

comment:3 Changed 4 years ago by keul

  • Status changed from new to assigned
  • Owner set to keul

The checkin checkout version of the working copy support also use copy/paste, but after make a copy it handle someway the references.

comment:4 Changed 2 years ago by eleddy

  • Version set to 4.1
  • Component changed from Unknown to Infrastructure
  • severity set to Normal
  • Milestone changed from 3.3.x to 4.x

confirmed in plone 4.2 latest.

comment:5 Changed 22 months ago by davisagli

  • Component changed from Infrastructure to General

comment:6 Changed 14 months ago by seanupton

  • Version changed from 4.1 to 4.3
  • Description modified (diff)
  • Summary changed from copy and paste does not copy the related items to ATContentTypes fails to paste relatedItems and ATPathCriterion, missing schema property

Modified and updated description, version. There is an easy fix if one takes advantage of a five-year-old feature added in #5180.

comment:7 Changed 14 months ago by seanupton

  • Owner changed from keul to seanupton

comment:9 Changed 3 months ago by davisagli

  • Status changed from assigned to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.