Bug #82032
closedCopying page containing tt_content irre elements causes error
100%
Description
If the content element has an inline relation to tt_content (PID is the same) and the parent page is copied and pasted, the following error message will be displayed.
'1: Repeated attempt to copy record "tt_content:17671" with override values' (see screenshot)
The TCA for tt_content used to reproduce it, is:
$additionalFields = [
'parent_id' => [
'config' => [
'type' => 'passthrough',
]
],
'item' => [
'exclude' => 0,
'label' => 'Element',
'config' => [
'type' => 'inline',
'foreign_table' => 'tt_content',
'foreign_field' => 'parent_id',
],
],
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $additionalFields);
$GLOBALS['TCA']['tt_content']['types']['content_element']['showitem'] .= '
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
item
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
';
Files
Updated by Heiko Bihlmaier about 7 years ago
- Tracker changed from Bug to Epic
- Priority changed from Should have to Must have
Hello,
I have the same error, but I don't have an IRRE Content Element.
I get this error when I copy a normal page with normal and mask content elements.
This is very annoying, because my customer needs this feature.
Updated by Heiko Bihlmaier about 7 years ago
- Tracker changed from Epic to Bug
- TYPO3 Version set to 8
- Complexity set to nightmare
Updated by Kevin Purrmann about 7 years ago
Pointed out that tt_content field 'l10n_source' causes the problem.
In Datahandler on line 3363:
if ($this->isRecordCopied($table, $uid)) {
if (!empty($overrideValues)) {
$this->log($table, $uid, 1, 0, 1, 'Repeated attempt to copy record "%s:%s" with override values', -1, [$table, $uid]);
}
return null;
}
$overrideValues is l10n_source => 0. Set in line 3624 and called in 3634.
May it helps.
Updated by Heiko Bihlmaier about 7 years ago
Can we fix this as soon as possible?
Updated by Heiko Bihlmaier about 7 years ago
I make a temporary bugfix directly into the datahandler.
unset($overrideValues['l10n_source'])
Then the copy process works.
Updated by ondro no-lastname-given about 7 years ago
Tobi Kretschmann wrote:
If the content element has an inline relation to tt_content (PID is the same) and the parent page is copied and pasted, the following error message will be displayed.
'1: Repeated attempt to copy record "tt_content:17671" with override values' (see screenshot)
The TCA for tt_content used to reproduce it, is:
[...]
Can confirm same behaviour with typo3 8.7.4
Updated by Tymoteusz Motylewski almost 7 years ago
- Category set to Localization
Thanks for the info.
Can you provide a small test extension to be able to quickly reproduce it?
Updated by Heiko Bihlmaier almost 7 years ago
You only need a page with content to reproduce this error.
When you wish, I can make a test system, where you can login in to test.
Updated by Christoph Lehmann almost 7 years ago
@Heiko: Do you have problems with deleting pages too ("Attempt to delete pages without delete-permission")? The will be deleted, but the message occurs. That was reported by an editor...
Updated by Christoph Lehmann almost 7 years ago
Error message on copying
I digged a little bit more into it and for me it's maybe an issue with gridelements:
- Add a page
- Add a gridlements ce
- Add an element into the grid element
- copy the page
Heiko, do you use gridelements too and is this our issue?
Updated by Heiko Bihlmaier almost 7 years ago
Our customer uses gridelements to build the site. Is that the reason for the copy error ?
Within the deletion process no error occurred.
Updated by David Bender almost 7 years ago
Heiko Bihlmaier wrote:
Our customer uses gridelements to build the site. Is that the reason for the copy error ?
Within the deletion process no error occurred.
I can confirm this behaviour with copying pages containing gridelements, too. For admin users as well as for editors.
Do you have problems with deleting pages too ("Attempt to delete pages without delete-permission")? The will be deleted, but the message > occurs. That was reported by an editor...
I can confirm this behaviour as well, but only for editors (and containing gridelements). Within my admin user no error occured, as described above.
Updated by Felix Nagel almost 7 years ago
Same issue here, TYPO3 8.7.6.
This seems to be an issue caused by copying IRRE elements (e.g. gridelements, flux sections, ...) in the page module.
Updated by Gernot Ploiner almost 7 years ago
Same error occurs with Mask and nested content (this is based on IRRE).
Updated by Laurent Foulloy almost 7 years ago
I confirm the error in TYPO3 8.7.8 when using one gridelement ce which contains one element.
As far as I can understand from the code, the method copySpecificPage() loops on all contents in the page, i.e. the gridelement ce and its child.
When processing the gridelement ce, the method copyRecord() is called. =This method calls the method copyRecord_processInline() which itself calls the method copyRecord_raw() for each child. This leads to have the child marked as copied.
After having processed the gridelement ce, its child is processed again by copyRecord()in the loop in copySpecificPage() which leads to the error.
Could one solution be to skip the call to copyRecord()when the record is already marked as copied ?
For example changing the following condition in copySpecificPage() solves the problem but I am not sure if there are side effects.
if ($row[$languageField] > 0 && $transOrigPointer > 0 && isset($rows[$transOrigPointer])) { continue; }
to
if (($row[$languageField] > 0 && $transOrigPointer > 0 && isset($rows[$transOrigPointer])) || $this->isRecordCopied($table, $row['uid'])) { continue; }
Updated by S P over 6 years ago
What is the state of this bug? We are experiencing this as well, but with our own private implmentation of grid-like content elements (where a CE is an inline child of another CE), we do not have any other extension that alters tt_content
.
Updated by Stephan Brun over 6 years ago
I still can reproduce the behaviour with TYPO3 8.7.9 and Gridelements 8.0.0
But only as an editor, not as admin.
I have also the error message "Attempt to delete pages without delete-permission" on deleting pages, which Christoph mentioned.
Updated by Rémy DANIEL over 6 years ago
Hello
Some further information on the cause of this issue...
This issue was introduced by change "[FEATURE] Introduce l10n_source field for tt_content", changeId: I3ecfeedb656c64681e5e3021cad6b708482520dc, review: https://review.typo3.org/51070
With this change, a copied record now have its l10n_source reset to 0.
But, this conflict with a preceding change which prevent an embedded record to be copied twice.
This is the purpose of the error message "Repeated attempt to copy record...": to prevent to copy a record that will be processed inside another copyRecord() call for the record of the default language. See commit message of changeId: I6647b02095343756d3a41b0c0e985b4777429cd8 reviewed on http://review.typo3.org/32356
So... what to do now?
I hope specialists of localization and workspace handling in the dataHandler will read that ;-)
Updated by Rémy DANIEL over 6 years ago
- File reproduce_82032.zip reproduce_82032.zip added
I've attached a simple extension to help reproduce the issue.
Updated by Tymoteusz Motylewski over 6 years ago
The easiest way to reproduce it is to:
- install EXT:Styleguide (it's included in the core require-dev depenedencies)
- go to styleguide module (help icon from top toolbar)
- navigate to "TCA / Records" tab
- click "Create styleguide page tree with data"
- go to page module
- try to copy "inline 1n"page
- Errors will appear:
1: Repeated attempt to copy record "tx_styleguide_inline_1n_child:15" with override values 1: Repeated attempt to copy record "tx_styleguide_inline_1n_child:14" with override values 1: Repeated attempt to copy record "tx_styleguide_inline_1n_child:18" with override values
The next step would be to create a functional test case illustrating the issue.
I think a test typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php
dataset could be extended to make copyPage test fail.
Updated by Rick Feuerabend over 6 years ago
Can also confirm this bug with TYPO3 v8.7.8 and mask v3.0.3. Mainly the copying of inline elements is working and just the log message is shown. But sometimes it happens that the inline elements are duplicated.
Updated by Karsten B B over 6 years ago
The same for me. "1: Repeated attempt to copy record "tt_content:1589" with override values" in TYPO3 8.7.11.
Updated by Lorenz Ulrich over 6 years ago
Same problem here with EXT:gridelements.
Updated by Jo Hasenau over 6 years ago
- Status changed from New to Accepted
- Complexity changed from nightmare to medium
Updated by Webadmin no-lastname-given over 6 years ago
Still happens in Typo3 8.7.13 with gridelements installed...
Updated by Sebastian Schmal over 6 years ago
Webadmin no-lastname-given wrote:
Still happens in Typo3 8.7.13 with gridelements installed...
same here! PLZ fix after 9 Months! Thanks!
Updated by Michael Grundkötter about 6 years ago
Still present in TYPO3 8.7.19 with gridelements 8.2.3
Updated by Tom Arnold about 6 years ago
Still present in 8.7.19 with custom nested elements (via Mask_Export). Despite the error showing in the backend (as an admin user, too) the elements then are copied correctly. I think this has changed since I first stumbled across this issue in the same install some months ago, where elements were missing in the copied page.
Updated by S P almost 6 years ago
- Category changed from Localization to DataHandler aka TCEmain
We have this also in a project with Gridlements, TYPO3 8.7.19.
I changed the category from Localisation to DataHandler because this is not restricted to localisation, it also affects single-language copies.
Updated by Bernhard Berger almost 6 years ago
still present in 8.7.20 :/ Hard to sell TYPO3 on new customers when they get massive error messages while basic work with the CMS :/
Updated by Gerrit Code Review over 5 years ago
- Status changed from Accepted 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 https://review.typo3.org/59202
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59202
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59234
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59235
Updated by Christoph Lehmann over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset eb042540bda64ae8af518783a3fa024ce1f500d6.
Updated by Gerfried no-lastname-given over 5 years ago
Really? The fix was to remove the message?
Updated by Gerrit Code Review over 5 years ago
- Status changed from Resolved 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 https://review.typo3.org/59281
Updated by Gerrit Code Review over 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59281
Updated by Gerrit Code Review over 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59281
Updated by Mathias Brodala over 5 years ago
- Status changed from Under Review to Resolved
More changes will be done in separate tickets.
Updated by Mathias Brodala over 5 years ago
- Related to Bug #87351: Delete content elements containing tt_content irre elements causes error added