Bug #22991
closed
htmlArea RTE won't load in backend extension
Added by Klaus Hinum over 14 years ago.
Updated about 6 years ago.
Description
The htmlarea RTE wont load any more when called in an own extension with the calls
$field .= $form->getSoloField($this->table,$dataArr[$this->table.'_'.$gpu_uid_GP],$value);
$this->content .= $form->printNeededJSFunctions_top();
$this->content .= $field;
$this->content .= $form->printNeededJSFunctions();
looks like a path issue, as it at least loads with errors when overwriting the BACK_PATH with $BACK_PATH = '../../../../';
Still, it will then load several times and some features wont work because of the wrong path.
(issue imported from #M14859)
Files
Forgot to mention: The RTE worked previous 4.4, but doesn't work in Typo3 4.4 anymore
Another addition: TinyRTE_MCE for example works without problems with the same code.
Could you provide a test extension demonstrating this issue, please.
I created a simple extension that should show an RTE and display the content of
tt_content -> bodytext
uid: 1
to change the uid to an existing tt_content element, just change
$tableuid = 1;
appropriately.
The extension works in Typo3 4.3.3 but the RTE wont load in 4.4.0.
Cheers, and sorry for the delay
Klaus
any update, still have to wait for this issue until I can install 4.4 (or switch to an alternative RTE).
Thanks for the test extension and sorry for the delay.
The attached patch fixes the issue. Please confirm.
Committed to SVN TYPO3core trunk (revision 8305) and branch TYPO3_4-4 (revision 8306) for inclusion in TYPO3 4.4.1.
Displaying a single field now works correctly, but when displaying two or more fields on a page, I get a corrupted output (multiple loaded instances as it looks).
Uploaded updated test with two instances that wont work with HTMLarea (but works with other editors like TinyRTE).
A similar error was already in an older version, so it may not be related to 4.4 changes.
Any update on this - still waiting for the bug to be fixed to switch to 4.4
1. You are inserting the same field from the same record on the same form because $tableuid2 is not used for "Another field"
2. You should invoke t3lib_TCEforms::printNeededJSFunctions_top and t3lib_TCEforms::printNeededJSFunctions only once for a given form.
Uploading corrected user extension.
Thanks for the help. I had it this way before, but with the older versions of the RTE it worked only that way to print out the JSFunctions multiple times. Perhaps you should add this to the RTE documentation to help other developers.
- Status changed from Resolved to Closed
Also available in: Atom
PDF