[TYPO3-dam-devel] RFC Bugfix: 6639: SQL errors when using List module to create new item
ben van 't ende [netcreators]
ben at netcreators.com
Sat Dec 29 23:55:15 CET 2007
Andreas Balzer wrote:
> Hi :)
> I asked nearly the same some days ago. As it seems like: yes :) Feel
> free to download the "old" version from TER ;)
>
> Although I would just tell the people to update to the newest version as
> soon as it is released..
Hi,
We should focus in the new release.
gRTz
ben
> Andreas
>
> On Dec 29, 2007 1:10 PM, Peter Kühn <peter.kuehn at wmdb.de
> <mailto:peter.kuehn at wmdb.de>> wrote:
>
> Ola!
>
> did i get this right? the reason why i tried to reproduce the bug for
> about half an hour without success is, that it only exists in version
> 1-0 - the one we want to release asap with the version we´re working
> on? ;)
> do i really have to setup a historical version to prove a fix for a
> historical bug?
>
> You're not serious, are you?
>
> pekue
>
> Michiel Roos schrieb:
> > 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
> >
> >
> >
> ------------------------------------------------------------------------
>
> >
> > --- lib/class.tx_dam_tcefunc.php 2007-12-25
> 04:06:06.000000000 -0500
> > +++ lib/class.tx_dam_tcefunc.fix.php 2007-12-25
> 04:06:22.000000000 -0500
> > @@ -837,7 +837,9 @@
> > $itemOut = '';
> >
> > $itemOut .=
> '<h4>'.$LANG->sl('LLL:EXT:dam/lib/locallang.xml:fileReference').'</h4>';
> > - $rows =
> tx_dam_db::getMediaUsageReferences($PA['row']['uid'], '');
> > + if (strstr('NEW', $PA['row']['uid']) != '') {
> > + $rows =
> tx_dam_db::getMediaUsageReferences($PA['row']['uid'], '');
> > + }
> >
> > for ($index = 0; $index < 2; $index++) {
> >
> _______________________________________________
> TYPO3-team-dam mailing list
> TYPO3-team-dam at lists.netfielders.de
> <mailto:TYPO3-team-dam at lists.netfielders.de>
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-dam
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> TYPO3-team-dam mailing list
> TYPO3-team-dam at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-dam
--
netcreators :: creation and innovation
www.netcreators.com - www.TYPO3.nl
Interesse in werken bij Netcreators?
http://www.netcreators.com/bedrijf/vacatures/
More information about the TYPO3-team-dam
mailing list