Bug #23413
closedhtmlArea RTE: Initialization in flexforms broken with 4.4
0%
Description
Type: Regression
Problem:
The initialization of RTE fields within flexforms is broken with 4.4, if the RTE field is not on the tab which is opened on load.
Reproduce:
- Install attached extension
- Add a content element, type plugin, name flexrte
- Safe element
- Sheet 1 will be open after safe > RTE's on the other two tabs are broken, no input possible Select "rte 1" tab, safe -> RTE on this tab will work after load, RTE's on sheet "rte 2&3" are broken
Notes:
- This regression is introduced with 4.4, it's not a problem with 4.3
- This issue gets critical with multiple RTE's on different tabs, if they have "required" attribute set, it's unable to safe then.
(issue imported from #M15512)
Files
Updated by Stanislas Rolland over 14 years ago
Thank you for providing a test extension.
Please report in what browser(s) the error occurs.
Updated by Stanislas Rolland over 14 years ago
I think that the error will arise in every browser. The RTE needs to know the nested structure of tabs and inline elements in which it resides.
This is because if a parent or ancestor object has the style "display: none", offsetWidth & offsetHeight are '0'. Therefore many sizing operations are wrong if the RTE is loaded in a hidden tab or inline element.
The RTE uses t3lb_tceForms::getDynNestedStack to get this structure. However, it seems that the flexform tabs are not registered into the DynNestedStack. This is the cause of the problem.
Updated by Stanislas Rolland over 14 years ago
The attached patch fixes the issue. Please confirm.
Updated by Julien Carvalho over 14 years ago
The patch is OK for me.
Test with TYPO3 4.4.2, Chrome and Firefox 3.6
Updated by Dirk Eidam about 14 years ago
I have a very similar problem by loading RTEs in Flexform sections. If a section is hidden on loading the RTE looks after opening the section like "15512_2.jpg".
Test with TYPO3 Versions:
- 4.4.2
- 4.4 trunk version and applied patch
Test with Browsers:
- Firefox 3.6.8
- IE 8.0
Updated by Stanislas Rolland about 14 years ago
@Dirk: please upload a test extension.
Updated by Dirk Eidam about 14 years ago
I have uploaded a test extension. The error occures when you add a new section, close the section and save the tt_content. After reopening the section the rte is not properly initialized.
Updated by Daniel Klockenkaemper about 14 years ago
The patch was also OK for me.
Tested with:
- TYPO3 4.4.2
- Firefox 3.6.8 and IE8.0
Updated by Stanislas Rolland about 14 years ago
@Dirk: Thanks for the test case. I attached a second version of the patch. This version should also handle the case of flexform toggles. Please confirm.
Updated by Dirk Eidam about 14 years ago
It seems that the RTE know properly initialized but I can't focus the textarea to enter text. When I have more than one section this problem not always occures.
Updated by Stanislas Rolland about 14 years ago
@Dirk: In what browser? Please explain exactly how to reproduce, because I am unable to reproduce.
Updated by Dirk Eidam about 14 years ago
I have test the problem with IE8, Firefox 3.6.9 and Opera 10.62 and the problem only occures in Firefox. I can reproduce the problem in TYPO3 Version 4.4.2 with the following steps:
1. Add the plugin "flexrte2" on a page
2. Add some sections, fill it with content and close the sections
3. Save the plugin
4. Reopen all sections
Now I can only focus the RTE in the last section. For all other RTEs it's not possible to focus and enter text.
Updated by Stanislas Rolland about 14 years ago
@Dirk: I think you need to apply the patch attached to issue #0015415.
Updated by Dirk Eidam about 14 years ago
Great work Stanislas! With the patch attached to issue 0015414 all works fine.
Both patches tested with:
- TYPO3 4.4.2
- Firefox 3.6.9 and IE8.0
Thank you
Updated by Stanislas Rolland about 14 years ago
Thanks for testing.
Please give your +1 to the patch pending in core list.
Updated by Stanislas Rolland about 14 years ago
Committed to SVN TYPO3core trunk (revision 8897) and branch TYPO3_4-4 (revision 8898).