[TYPO3-dam-devel] RFC #9113: Render new image in RTE-enabled content when the file name is changed in DAM record
Stanislas Rolland
typo3 at sjbr.ca
Sat Aug 9 23:06:46 CEST 2008
Hi Dan,
If you installed the latest TYPO3 4.2.2-dev and DAM 1.1.0-dev and you
applied the patch for #9113, then:
1. uncheck the use of DAM in the EM settings of the RTE;
2. check RTE integration in the EM settings of DAM;
3. clear the TYPO3 configuration cache;
4. delete all files in typo3temp/rtehtmlarea;
5. clear the browser cache.
Thank you for testing this patch,
Stanislas
P.S. You do not need to apply patch #8673, as it has already been
committed to DAM (revision 9502) and tested with SVN TYPO3_4.2 (revision
3898).
Dan Osipov a écrit :
> Stanislas,
>
> I tried to apply your patch to a fresh install of Typo3 4.2.2-dev and
> DAM 1.1.0-dev from SVN.
> I enabled the use of DAM in the RTE settings.
> While creating a text element and attempting to add an image I was
> greeted with the following error:
> Fatal error: Call to a member function getContextMenuCode() on a
> non-object in
> /srv/www/htdocs/t34-22/typo3conf/ext/dam/class.tx_dam_browse_media.php
> on line 139
>
> After applying the patch, the error persisted.
> Ideas?
>
> Thanks for your work!
> Dan Osipov
> Calkins Media
> http://danosipov.com/blog/
>
> Stanislas Rolland wrote:
>> Hi all,
>>
>> This is a SVN patch request for the DAM project.
>>
>> Type: Feature
>>
>> Problem:
>> If an image was inserted in a RTE-enabled field of tt_content and the
>> file name is updated in the DAM record, the new file or renamed file
>> should be rendered in the frontend.
>>
>> Solution:
>> The attached patch adds a preprocessing function of the img tag to the
>> frontend parsing of RTE-enabled content. The function looks for custom
>> attribute txdam. As a side-result of a previous patch, the value of
>> the attribute is set to the value of the DAM media id when the image
>> is inserted in the RTE-enabled field. If the current file name found
>> in the DAM record is different from the one that was inserted in the
>> RTE content, the src attribute of the img tag is updated. If the image
>> was a magic image, a new reference and magic images are created (if no
>> such files exist with the same file name, media id, and magic width
>> and height). The custom attribute is then unset so that it does not
>> show up in the frontend html. The page content cache must be cleared
>> for the new image to be rendered.
>>
>> Notes:
>> 1. Thanks to alterNet for sponsoring this work.
>> 2. This patch requires current SVN TYPO3core branch TYPO3_4-2 (TYPO3
>> 4.2.2-dev).
>> 3. Tested with current SVN TYPO3core branches TYPO3_4-2 and trunk.
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=9113
>>
>> Branches:
>> trunk
>>
>> Kind regards,
>> Stanislas
>>
More information about the TYPO3-team-dam
mailing list