Bug #20233

RTE doesn't know what to do with <media> tag and encodes the braces of tag

Added by Thomas Mammitzsch almost 13 years ago. Updated over 12 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


if i link from RTEhtmlarea 1.7.8 to an image (using media tab in document browser) the RTE inserts the link correctly.
If i then save the document, there is shown <media 5764>this is the link</media> and no hyperlink. If i then save again, the link is not rendered in the frontend, because the braces of the <media> tag are encoded (< >)

i use the media tab from dam instead of filebrowser
(issue imported from #M10772)


Updated by Stanislas Rolland almost 13 years ago

What version of dam are you using?


Updated by Administrator Admin over 12 years ago

Can confirm this bug. However, it does only appear in news items for me.
First time, media is linked correctly but after editing the news item a second time, media-tags are coded in html and links are broken.

Typo3: 4.2.6
dam: 1.1.1
tt_news: 2.5.2


Updated by Alban Cousinie over 12 years ago

Same problem here with regular text content (not tt_news). <a> link tags are converted to <media> on first save, then links get broken.

Typo3 4.2.6
Dam 1.1.1
rtehtmlarea 1.7.9


Updated by Jochen Weiland over 12 years ago

As far as I know this is caused by an incorrect load order of the dam and rtehtmlarea extensions. The RTE needs to be loaded before the DAM extension. You can change the load order in the string "extList" in localconf.php


Updated by Administrator Admin over 12 years ago

I checked my localconf,php and there dam comes after rtehtmlarea.

However, I check the configuration of the dam extension and found that unchecking 'media tag' option results in the correct behavior.

Could it be that this switch is implemented the wrong way?


Updated by Alban Cousinie over 12 years ago

The config parameter for the <media> option of the DAM extension is documented like this in the backend ;

This adds the tag <media> to RTE content processing and frontend rendering. This is needed to create files links using DAM references. Additional page TSconfig may be needed to enable the media tag. See the manual for more information.

So it may not be a bug, but missing additional typoscript configuration may lead to visual appearance of the media tag in the frontend


Updated by Daniel Sasjadvolk over 12 years ago

Got the same problem:
Typo3: 4.2.6
dam: 1.1.1
tt_news: 2.5.2
rtehtmlarea 1.7.9


Updated by Jochen Rieger over 12 years ago

Had the same problem... but changes to page TS Config (allowing meda tag) and especially changes to the TCA types array helped:

"..., bodytext;;;richtext:rte_transform[flag=rte_enabled|mode=ts_css];2-2-2,..."

As far as I remember I even removed tx_dam from the mode where now only ts_css is set.


Updated by Daniel Sasjadvolk over 12 years ago

Could you please tell us more? Didn't really find the code you mentioned above. An exact explanation would be awesome. Thanks in advance.


Updated by Juris Treibahs over 12 years ago

Had the same problems with tt_news - on first save <media> tag appeared, on second save in frontend <media> appreared as text. Solved problem with tt_news by adding TS config

RTE.config.tt_news.bodytext.proc.overruleMode = ts_css,txdam_media
RTE.config.tt_news.bodytext.types.text.proc.overruleMode = ts_css,txdam_media
RTE.config.tt_news.bodytext.types.textpic.proc.overruleMode = ts_css,txdam_media

to page TS config (select a page ->Edit page page properties ->Option tab ->TSconfig).

Befofe I tried to add this config to Template record, it did not give effect. Apparently it was because that was wrong place for RTE property.

rtehtmlarea 1.7.9
dam 1.1.1
typo3 4.2.6


Updated by Daniel Sasjadvolk over 12 years ago

Excellent! Worked out for me! Thank you very much Juris.


Updated by Jacco Lammers over 12 years ago

Works for me too! Thanks Juris!

dam 1.1.1
typo3 4.2.6
rtehtmlarea 1.7.9


Updated by samrat chakraborty over 12 years ago

RTE.default.proc.overruleMode = ts_css,txdam_media

add this line too in ur page TS Config


Updated by Stanislas Rolland over 12 years ago

Closing this issue as it is a Page TS configuration issue for using tt_news with rtehtmlarea and DAM.

DAM does configure Page TS for tt_content table but not for tt_news. See

Also available in: Atom PDF