[TYPO3-dam-devel] RFC: Bugfix: 8236: double media folder after update

Michiel Roos michiel at netcreators.com
Fri Apr 25 12:41:35 CEST 2008


This is a svn patch request.

Type: bugfix

Bugracker reference: http://bugs.typo3.org/view.php?id=8236

Description:
After the update to Typo3 4.2.0 a double media folder exists.
The second one (new one) can not be deleted.... a new one is generated  
autmaticly (id +1).
The old folder contains the categories, the new one does not.

Cause:
In TYPO3 4.2 the page type 2 (Advanced) was removed. A function checks  
for existence of the media folder as follows:
if ($damFolders = $GLOBALS['TYPO3_DB']- 
 >exec_SELECTgetRows('uid,pid,title', 'pages', 'doktype=2 and module='. 
$GLOBALS['TYPO3_DB']->fullQuoteStr('dam', 'pages').' AND deleted=0',  
'', '', '', 'uid')) {

In 4.2 this check always fails.

Solution:
Change the above line into
if ($damFolders = $GLOBALS['TYPO3_DB']- 
 >exec_SELECTgetRows('uid,pid,title,doktype', 'pages', 'module='. 
$GLOBALS['TYPO3_DB']->fullQuoteStr('dam', 'pages').' AND deleted=0',  
'', '', '', 'uid')) {

And in the create functions the line:

     $fields_values['doktype'] = 254;

should be changed to:

     $fields_values['doktype'] = 2;

Please find a patch attached

Met vriendelijke groet,

Michiel Roos

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

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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20080425/357c74fa/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 8236.diff
Type: application/octet-stream
Size: 1695 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20080425/357c74fa/attachment.obj 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.netfielders.de/pipermail/typo3-team-dam/attachments/20080425/357c74fa/attachment-0001.htm 


More information about the TYPO3-team-dam mailing list