Project

General

Profile

Actions

Bug #49804

closed

Wrong dam record references when copying records with DAM record references

Added by Christian Heindl over 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2013-07-09
Due date:
% Done:

0%

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

Description

Scenario:
  • 'tt_content' record with a field, which references DAM records/images ("txdam_getMediaTCA('image_field', 'field')"). uid:123
  • 'pages' record also with a field, which references DAM records/images ("txdam_getMediaTCA('image_field', 'field')"). uid:123

Problem:
When you copy the tt_content record, the copy references not only the images which, where referenced by tt_content:123 but also the images referenced by pages:123.

It seems as the TYPO3 core API does not correctly query for the "tablenames" in the "tx_dam_mm_ref" table, when processing the field within t3lib/class.t3lib_loaddbgroup.php -> method "readMM" (line 260).

Steps to reproduce:
  1. Copy the tt_content:123 record to another page
Environment:
  • dam 1.3.1
  • TYPO3 v4.7.10
Actions #1

Updated by Christian Weiske about 11 years ago

I can reproduce this on TYPO3 4.7.14.
I used dam_ttnews, created a news record with the same uid as a tt_content images element, ran

typo3conf/ext/dam_ttnews$ sed -i 's/tx_damnews_dam_images/tx_damttcontent_files/' *.php *.sql *.xml

added an image to the news record and copied it. News record has image from the news record and the tt_content record.

Actions #2

Updated by Christian Weiske about 11 years ago

This is really a bug in TYPO3 core, class.t3lib_tcemain.php::copyRecord_procBasedOnFieldType().
It uses t3lib_loadDBGroup, which does not include the table name in the SQL:

SELECT * FROM tx_dam_mm_ref
 WHERE uid_foreign=275 AND ident='tx_damttcontent_files'
 ORDER BY sorting_foreign
Actions #3

Updated by Christian Weiske about 11 years ago

  • Project changed from 128 to TYPO3 Core

Move to TYPO3 core bugtracker.

Actions #4

Updated by Christian Heindl over 10 years ago

Problem is still present in current 6.2 release train.

Actions #5

Updated by Riccardo De Contardi over 9 years ago

  • Category set to Database API (Doctrine DBAL)
  • Status changed from New to Needs Feedback
  • Assignee set to Christian Heindl
  • TYPO3 Version set to 4.7
  • Is Regression set to No

Hi Christian, as far as I know DAM is not compatible with 6.2... could you tell us how to reproduce the error in 6.2?

(I set for now version as 4.7)

Thank you!

Actions #6

Updated by Christian Heindl over 9 years ago

As mentioned above, the problem is within the TYPO3 core database api. Therefore the problem still exists in 6.2 (although not with the dam extension, but other extensions may be affected by that problem). According to Christian Weiske the problem should now be located within the TYPO3\CMS\Core\DataHandling\DataHandler::copyRecord_procBasedOnFieldType() or TYPO3\CMS\Core\Database\RelationHandler class.

Actions #7

Updated by Riccardo De Contardi over 9 years ago

  • Status changed from Needs Feedback to New
  • Assignee deleted (Christian Heindl)
  • TYPO3 Version changed from 4.7 to 6.2
Actions #8

Updated by Riccardo De Contardi over 9 years ago

  • Status changed from New to Accepted
Actions #9

Updated by Morton Jonuschat about 8 years ago

  • Category changed from Database API (Doctrine DBAL) to DataHandler aka TCEmain
Actions #10

Updated by Tymoteusz Motylewski over 6 years ago

  • Status changed from Accepted to Needs Feedback

Can somebody provide steps to reproduce with any supported TYPO3 version?
I can help in fixing whathever it is, but need to be able to reproduce first.
In case of lack of feedback the issue will be closed.

Actions #11

Updated by Riccardo De Contardi about 6 years ago

  • Status changed from Needs Feedback to Closed

No feedback since the last 90 days => closing this issue.

If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem on recent TYPO3 versions like 8.7.x or 9.5.x, please reopen it or open a new issue with a reference to this one.

Thank you and best regards

Actions

Also available in: Atom PDF