[TYPO3-dam-devel] RFC: Bugfix: 5527: Go to editing of DAM record from the content element (image)

Peter Kuehn [wmdb] peter.kuehn at wmdb.de
Fri May 9 13:19:25 CEST 2008


-1 and a bit confused:

lines 53/54 of class.tx_dam_cm_file.php reads:

   // Returns directly, because the clicked item was not a file
   if ($backRef->cmLevel==0 AND $uid!='') return $menuItems;

clickMenu->init sets

   $this->cmLevel = intval(t3lib_div::_GP('cmLevel'));

on line 170 in alt_clickmenu.php

my ajax-call reads:
http://www.xxx.de/typo3/alt_clickmenu.php?table=tx_dam&uid=9588&listFr=1&enDisItems=%2Bcopy%2Cinfo%2Cedit%2Cview&backPath=%7C38e7b8b145&addParams=&ajax=1
as compiled by Clickmenu.show() in typo3/js/clickmenu.js - benni knows 
best ;)

no parameter cmLevel given - intval makes it '0'

leads to:
line 78 of class.tx_dam_cm_file.php and bennis patch is not reached due 
to the return on line 54

what am i doing wrong here?
testing on 4.2 final with dam from trunk - i think :(

please help! ;)
gRTz
pekue

Benjamin Mack schrieb:
> Hey all,
> 
> again to this problem. I finally tracked it down.
> 
> The problem:
> No clickmenu is shown when in TCEforms and clicking on the icon of a DAM 
> indexed file. Why? First of all, once the DAM clickmenu finds out that 
> this is an indexed file it clears all existing menuItems. Not good (see 
> the problems with templavoila) but there is no simple solution at hand 
> yet. Yes, so the DAM replaces the menuItems, and they should be 
> displayed, BUT there is a displaying constraint in TCEforms to say that 
> only items XYZ are allowed to be displayed. Well, this information is 
> completely invalid, as the clickmenu is completely cleared anyway. The 
> check on the allowance is done after the DAM built its own menuItems, 
> that's why it's emptying out these.
> 
> The solution:
> We need to "empty" / clear these displaying constraints (which are 
> stored in the iParts[3] variable.
> 
> The real solution (for those who are interested):
> The real solution would be to change the visibility constraints in the 
> TCEForms (or whereever the clickmenu is used) to add the DAM options 
> there. Through that we wouldn't even need to clear all existing 
> menuItems. Unfortunately, as Peter stated, this is not possible in the 
> Core right now.
> 
> Anyway, with the attached patch we can solve the problem for now, it's 
> not perfect but not too bad either IMHO. Please test and enjoy, it's 
> quite simple to reproduce.
> 


More information about the TYPO3-team-dam mailing list