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

Oliver Hader oh at inpublica.de
Sun Dec 9 14:25:23 CET 2007


FYI: Committed to TYPO3_4-1 (rev. 2807)
Still pending for Trunk since some changes are required due to recent
changes in RTEhtmlarea.

olly


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.
> 
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=5994
> 
> Branches: TYPO3_4-1 & Trunk
-- 
Oliver Hader
http://inpublica.de/


More information about the TYPO3-team-core mailing list