[TYPO3-core] RFC: Bug #5994: IRRE - RTEhtmlarea is not show in child records if parent has no RTE

Oliver Hader oh at inpublica.de
Mon Oct 29 20:02:36 CET 2007


Hi Masi,

Martin Kutschker schrieb:
> Oliver Hader schrieb:
>> This is a SVN patch request.
>>
>> Problem:
>> Imagine a the following scenario:
>> * parent table with no RTE field; embedding child records using IRRE
>> * child table with one or more RTE fields
>> When creating a new parent record and then in the same step a new child
>> record, the required JavaScripts for RTEhtmlarea are not present and
>> thus, RTE cannot be used. If the paren with at least one child record
>> was saved and the form reloaded, the JavaScript libs for RTE are loaded
>> and everything works as expected.
>>
>> Solution:
>> The reason is, that on rendering the parent table in TCEforms, it's
>> unknown at that time, that child records might have RTE fields and thus
>> those JavaScript libraries for RTE were required. Furthermore there's no
>> "direct" way of including JavaScripts with '<script src="..." />' on
>> AJAX calls.
>> The solution is, to parse the HTML code that is normally put into the
>> '<head>' tag of an HTML page during an AJAX call for '<script>' tags and
>> put a hint to the JSON data that is delivered back to the browser. These
>> tags are there processed with JavaScript and put to the '<head>' tag of
>> the current HTML page.
>> Since I do not know about a possibility in JavaScript to set global
>> variables from inside a function, I removed the 'var' types of the
>> JavaScript output in class.tx_rtehtmlarea_base.php.
>>
>> Comments:
>> The patches for the 4.1 branch and Trunk are attached. In the
>> bugtracker, there's an extension which allows one to test this issue.
>> Since this is related to IRRE only, I'm going to commit in one week if
>> nobody objects.
> 
> * You add a function to t3lib_div which is not allowed for 4.1.
> * I don't think parseTags qualifies for t3lib_div
> * Isn't there a better way to get and recreate a DOM than parseTags?
> * The patch touches the RTE so it's not only IRRE related

The parseTags method was replaced by some calls to t3lib_parsehtml and
moved to t3lib_TCEforms_inline since it's required there.

Please test this issue with the attached patch files (v6) for Trunk and
TYPO3_4-1. Thanks in advance!


olly
-- 
Oliver Hader
http://inpublica.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005994_trunk_v6.patch
Type: text/x-patch
Size: 13395 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20071029/74735f3e/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005994_4-1_v6.patch
Type: text/x-patch
Size: 13387 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20071029/74735f3e/attachment-0003.bin 


More information about the TYPO3-team-core mailing list