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

Michiel Roos michiel at netcreators.com
Mon May 5 21:40:34 CEST 2008


+1

Patch applies cleanly and a clickmenu does indeed appear as shown in  
the screenshot in the bugreport.

On May 2, 2008, at 7:14 PM, Benjamin Mack wrote:

> 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.
>
> -- 
> greetings,
> benni.
> -SDG-
> Index: binding/be/class.tx_dam_cm_file.php
> ===================================================================
> --- binding/be/class.tx_dam_cm_file.php	(revision 9058)
> +++ binding/be/class.tx_dam_cm_file.php	(working copy)
> @@ -73,8 +73,12 @@
> 			return $menuItems;
> 		}
>
> -			// just clear the whole menu
> +			// clear the whole menu and the display constraints
> +			// once a DAM file is found
> 		$menuItems = array();
> +			// see typo3/alt_clickmenu.php:clickmenu::enableDisableItems()  
> for iParts[3]
> +			// which is called after this function
> +		$backRef->iParts[3] = '';
>
>
> 		$actionCall = t3lib_div::makeInstance('tx_dam_actionCall');
> @@ -147,4 +151,4 @@
> 	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/dam/ 
> binding/be/class.tx_dam_cm_file.php']);
> }
>
> -?>
> \ No newline at end of file
> +?>
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
>
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-dam mailing list
> TYPO3-team-dam at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-dam


Met vriendelijke groet,

Michiel Roos

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

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



More information about the TYPO3-team-dam mailing list