Project

General

Profile

Actions

Bug #18311

closed

Remove DAM-References from media field does not work

Added by Christian Trabold over 16 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2008-02-26
Due date:
% Done:

0%

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

Description

There's a strange behavior when storing and deleting DAM-Elements in Media-Field:

1) Everytime the Content-Element gets saved a new MM-Ref gets stored in tx_dam_mm_ref.

2) After removing the DAM-Reference from Media-Field and saving the Content-Element, the References are still there.

This only happens on the Postgres-Environment - on MySQL everything works all fine.

Versions:
TYPO3 4.1.2
DAM 1.0.101
Postgres 8.1.11
(issue imported from #M7672)

Actions #1

Updated by Michiel Roos almost 16 years ago

Hi Christian,

Can you still reproduce this with the latest version from svn?

Actions #2

Updated by Michiel Roos over 15 years ago

Hmm, would like to send you a reminder but there are like 20 Christians registered on bugs.typo3.org :-)

Actions #3

Updated by Philipp Thiele almost 15 years ago

Problem is still (T3 4.2.9, DAM 1.1.1, dam_ttcontent 1.1.0) there, occours also with Oracle 11g.
DBAL-Debug gives following hint:
SELECT "uid_local", "tablenames"
FROM "tx_dam_mm_ref"
WHERE
"uid_foreign" = 61 AND "tablenames" = "tt_content" AND "ident" = 'tx_damttcontent_files'
ORDER BY "sorting_foreign"
1 ORA-00904: "tt_content": ungültiger Bezeichner

So i think, the problem is the wrong escaping of tt_content (its not a table here, but an entry in this column) so it has to escape as 'tt_content' - but i can not find the code where this happens.
fullQuoteStr or QuoteStr should do it...

Actions #4

Updated by Philipp Thiele almost 15 years ago

Problem is located at line 357 in t3lib/class.t3lib_loaddbgroup.php. There the value for the field tablenames isn't quoted properly.
My solution:
// $additionalWhere_tablenames = ' AND tablenames="'.$this->currentTable.'"';
$additionalWhere_tablenames = ' AND tablenames='.$GLOBALS['TYPO3_DB']->fullQuoteStr($this->currentTable, $MM_tableName);

Actions #5

Updated by Christian Kuhn almost 14 years ago

Is this still a problem with current versions (4.5)? There was a lot of action in dbal, maybe this is solved?

Actions #6

Updated by Michael Stucki over 13 years ago

  • Target version deleted (907)
Actions #7

Updated by Dmitry Dulepov over 13 years ago

  • Status changed from Needs Feedback to Closed
  • TYPO3 Version set to 4.5

No feedback provided within 90 days. Closing the issue.

Actions

Also available in: Atom PDF