Bug #66920

Error by copying a record with IRRE elements creates duplicated references by the original record

Added by András Ottó about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
FormEngine aka TCEforms
Target version:
-
Start date:
2015-05-12
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

We have found a bug with one of our small product extension. The original problem was, that some user could not copy a product, because it showed an error, but after the error message and an unsuccessful copy, the IRRE records are doubled in the original record.

We made some experiment, and it seems to be a core bug.

How to reproduce it:
1) Create a simply Image CE with one image.
2) Go to the List Modul and copy this content element
3) Select the root page
4) Try to insert it -> it should show an error: "1: Attempt to insert record on page '[root-level]' (0) where this table, tt_content, is not allowed".
So far so good
5) Open the original Image CE and you have 2 reference instead of 1. And the second has pid = 0 in DB.

It seems, if an error occurs, the child records are not removed from the db, but somehow referenced to the original record, which you copied. This probably happens also by different errors, which blocks the copy process of the original record.

This way "how to reproduce it" is only an example, we have seen to happen with other errors also.

We tested this with 2 different extension and content elements on 2 different instances with 6.2.12 and on a third instance with the newest 7.2.
We have no workspaces.

Associated revisions

Revision 293b93b7 (diff)
Added by Nicole Cordes about 2 years ago

[BUGFIX] Prevent wrong record copies

Before starting any record copy process, we have to check if the
destination page can handle the record type. Currently if you copy a
record with IRRE references, the references are copied first but the
original record isn't copied because of missing permissions. The
copied IRRE elements stay and pollute the original record as the
references are added to it. This patch adds a check if the destination
page can handle the mother record type and starts copy process only if
allowed.

Resolves: #66920
Releases: master, 6.2
Change-Id: I274792b13170f37e3e799ff892ea877ba44d90a8
Reviewed-on: http://review.typo3.org/39605
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

Revision fa5fdb4d (diff)
Added by Andreas Fernandez about 2 years ago

[BUGFIX] Prevent wrong record copies

Before starting any record copy process, we have to check if the
destination page can handle the record type. Currently if you copy a
record with IRRE references, the references are copied first but the
original record isn't copied because of missing permissions. The
copied IRRE elements stay and pollute the original record as the
references are added to it. This patch adds a check if the destination
page can handle the mother record type and starts copy process only if
allowed.

Resolves: #66920
Releases: master, 6.2
Change-Id: I274792b13170f37e3e799ff892ea877ba44d90a8
Reviewed-on: http://review.typo3.org/39616
Reviewed-by: Andreas Fernandez <>
Tested-by: Andreas Fernandez <>

History

#1 Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39605

#2 Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39605

#3 Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39605

#4 Updated by András Ottó about 2 years ago

This seems to be good, we have tested it and it is working.

#5 Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39616

#6 Updated by Nicole Cordes about 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF