[TYPO3-dam-devel] RFC Bugfix: 6639: SQL errors when using List module to create new item

Michiel Roos michiel at netcreators.com
Thu Dec 27 17:33:48 CET 2007


Hi,

This is a svn patch request.

Type: bugfix

Problem: SQL errors are thrown when creating a new media record from 
list mode.

Cause:
tx_dam_fileUsage calls getMediaUsageReferences with a uid like: 
'NEW9834759453987'. This confuses getMediaUsageReferences in a bad way. 
It tries to control its own sanity by cleaning the passed in uidlist using:
$GLOBALS['TYPO3_DB']->cleanIntList($uidList)

That comes out '0' (zero).

No other parameters are passed in, so the resulting $where ends up empty 
and the query fails.

Responsibility lies with tx_dam_fileUsage which should not try to get 
'media usage references' for a non exising record.

The attached patch checks if we are dealing with a new record using:
    if (strstr('NEW', $PA['row']['uid']) != '') {
       // get the media file ref
    }

Branches:
1-0
Not present in trunk.

Kind regards,


Michiel Ros

-- 
Netcreators BV :: creation and innovation
www.netcreators.com 

Interesse in werken bij Netcreators?
http://www.netcreators.com/bedrijf/vacatures/ 

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 6639.fix.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20071227/b3d25049/attachment.txt 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: michiel.vcf
Type: text/x-vcard
Size: 292 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20071227/b3d25049/attachment.vcf 


More information about the TYPO3-team-dam mailing list