[TYPO3-dam-devel] RFC Bugfix: 5681: Link Popup javascript error when changing DAM directory in File selection

Benjamin Mack benni at typo3.org
Fri May 2 11:07:26 CEST 2008


Hey Michiel,

your bugfix states "FIXME", so I think we should fix this on the JS 
level, not involving PHP.

Your Patch checks in PHP if a variable is present, and if not, it 
defines the function in JS. As stated on the BT, I'd do this purely in 
JS, where you can check if a function is defined already, similar to 
what we have in PHP used as "function_exists()".

This would be:

$JScode .= '

   if (!jumpToUrl) {
     function jumpToUrl() {

     }
   }
';

If everybody agrees on this work, I'll create a patch right away.

greetings,
benni.


Michiel Roos wrote:
> Peter Kühn wrote:
>> Hi Michiel, hi yall,
>>
>> you were right:
>> it didn't work for links in the media type tree.
>>
>> it didnt work as well for
>> - the plus and minus signs in the folder tree.
>> - the arrow bullets on the right side of the folder tree
>> - all other titles, plus/minus and arrow bullets in all other trees
>> - the show 20/50/... pull down
>> - the file sorting pull down
>> - the asc/desc switch button
>> - the selection, search and options foldout menus in the bottom of the EB
>>
>> please check thoroughly if
>> - the list above is this time complete
>> - the attached patch solves all existing issues
>> and make my day ...
> -1
> 
> Well . . . kind of, not completely I think. It does still not preserve 
> contentTypo3Language, contentTypo3Charset etc.
> 
> The reason for this is that the jumpToUrl is defined twice. The first 
> one in rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php, the 
> second one in dam/lib/class.tx_dam_scbase.php
> 
> Please find attached a patch that checks to see if the editor is loaded 
> and only defines the 'simple' jumpToUrl if it is not loaded.
> 
> This should fix all our problems.
> 
> Kind regards,
> 
> 
> Michiel Roos


More information about the TYPO3-team-dam mailing list