Bug #23492
closedt3lib_TCEforms_inline registers superfluous nested level when renderFieldsOnly is set
0%
Description
In my case i have got an database entry which contains irre child entries configured that way:
'description' => array(
'exclude' => '1',
'label' => 'Description goes here',
'config' => array(
'type' => 'inline',
'foreign_table' => 'TEXT',
'maxitems' => '2',
'renderFieldsOnly' => '1',
),
),
When I create a new TEXT item containing the rte it does not get loaded and keeps telling me "The editor is being loaded. Please wait...". RTE debug messages are the following:
The editor is being loaded. Please wait...
[HTMLArea::init]: Editor url set to: sysext/rtehtmlarea/htmlarea/
[HTMLArea::init]: Editor skin CSS set to: sysext/t3skin/rtehtmlarea/htmlarea.css?1283150024
[HTMLArea::init]: Editor content skin CSS set to: sysext/t3skin/rtehtmlarea/htmlarea-edited-content.css?1283150024
[HTMLArea::initEditor]: Initializing editor with editor Id: data[tx_traveldb_domain_model_text]2[text].
[HTMLArea.Editor::registerPlugin]: Plugin EditorMode was successfully registered.
[HTMLArea.Config::registerHotKey]: A hotkey with key b was registered for toolbar item Bold.
[HTMLArea.Config::registerHotKey]: A hotkey with key i was registered for toolbar item Italic.
[HTMLArea.Editor::registerPlugin]: Plugin DefaultInline was successfully registered.
[HTMLArea.Config::registerHotKey]: A hotkey with key 1 was registered for toolbar item FormatBlock.
[HTMLArea.Config::registerHotKey]: A hotkey with key 2 was registered for toolbar item FormatBlock.
[HTMLArea.Config::registerHotKey]: A hotkey with key 3 was registered for toolbar item FormatBlock.
[HTMLArea.Config::registerHotKey]: A hotkey with key 4 was registered for toolbar item FormatBlock.
[HTMLArea.Config::registerHotKey]: A hotkey with key 5 was registered for toolbar item FormatBlock.
[HTMLArea.Config::registerHotKey]: A hotkey with key 6 was registered for toolbar item FormatBlock.
[HTMLArea.Config::registerHotKey]: A hotkey with key n was registered for toolbar item FormatBlock.
[HTMLArea.Config::registerHotKey]: A hotkey with key TAB was registered for toolbar item Indent.
[HTMLArea.Config::registerHotKey]: A hotkey with key SHIFT-TAB was registered for toolbar item Outdent.
[HTMLArea.Editor::registerPlugin]: Plugin BlockElements was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin BlockStyle was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin CharacterMap was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin TextStyle was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin TYPO3Link was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin TextIndicator was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin FindReplace was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin RemoveFormat was successfully registered.
[HTMLArea.Config::registerHotKey]: A hotkey with key 0 was registered for toolbar item CleanWord.
[HTMLArea.Editor::registerPlugin]: Plugin DefaultClean was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin TableOperations was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin AboutEditor was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin ContextMenu was successfully registered.
[HTMLArea.Config::registerHotKey]: A hotkey with key z was registered for toolbar item Undo.
[HTMLArea.Config::registerHotKey]: A hotkey with key y was registered for toolbar item Redo.
[HTMLArea.Editor::registerPlugin]: Plugin UndoRedo was successfully registered.
[HTMLArea.Editor::registerPlugin]: Plugin CopyPaste was successfully registered.
Firebug told me the following:
Ext.get(element) is null
http://localhost/test/typo3temp/compressor/ext-all-debug-ed2fcc9d4685d335c158cd622c4f01c0.js
Backtrace:
Line 4577
data(Object { name="el"}, Object { name="key"}, Object { name="value"})ext-al...01c0.js (Zeile 4577)
unmask()ext-al...01c0.js (Zeile 7540)
onEnable()ext-al...01c0.js (Zeile 24269)
enable()ext-al...01c0.js (Zeile 15838)
enable()ext-al...01c0.js (Zeile 47431)
handleMouseUp(Object { name="e"})ext-al...01c0.js (Zeile 28536)
h(Object { name="e"})ext-al...01c0.js (Zeile 2853)
[Break on this error] return c[key];
I think the RTE somehow refers to an element that gets rendered in regular IRRE configuration but with the option renderFieldsOnly on not.
(issue imported from #M15622)
Files
Updated by Thomas Maroschik about 14 years ago
sorry forgot typo3 version. its typo3 4.4.3-dev
addionall i disabled js compressor. here the firebug debug message:
Ext.get(element) is null
(?)(Object { name="name"}, Object { name="ns"}) ext-all-debug.js (Zeile 4438)
getTipCfg(Object { name="e"}) ext-all-debug.js (Zeile 47224)
onTargetOver(Object { name="e"}) ext-all-debug.js (Zeile 47255)
h(Object { name="e"}) ext-all-debug.js (Zeile 2853)
return d.getAttributeNS(ns, na...) || d.getAttribute(name) || d[name];
Updated by Thomas Maroschik about 14 years ago
Attached a patch, that fixes the problem. In class.t3lib_tceforms_inline on about lin 437 there was a part like
if ($config['renderFieldsOnly']) {
$out = $fields . $combination;
} else ...
which made it impossible to detect irre records when renderFieldsOnly is set.
Replaced it by
if ($config['renderFieldsOnly']) {
$out = '<div id="' . $objectId . '_fields" >' . $fields . $combination . '</div>';
} else ...
and everything works fine.
Updated by Stanislas Rolland about 14 years ago
I think that in such case, the div should not be in the output.
The problem is that no nested level should then be registered.
Attaching a different patch that should fix the issue. Please confirm.
Updated by Thomas Maroschik about 14 years ago
Patch resolves the error.
Thank you very much.
JavaScript isn't really my department, so debugging the javascript code and modifing the php was the easier task ;)
Updated by Stanislas Rolland about 14 years ago
Sorry, maybe I generated confusion here. I uploaded a patch to the RTE script, then deleted it, and added the currently attached patch which applies to t3lib_tceforms_inline. Did you apply this last one?
Updated by Thomas Maroschik about 14 years ago
No, sorry. I'm generating the confusion. I applied the patch, assumed you changed something in rtehtmlarea and postet my reply. A few moments later I realized, that you changed class.t3lib_tceforms_inline.php. Nevertheless good job.
Updated by Stanislas Rolland about 14 years ago
The patch is now pending in the core list under modified issue title. Please give your +1 there.
Updated by Stanislas Rolland about 14 years ago
Committed to SVN TYPO3core trunk (revision 8789) and branch TYPO3_4-4 (revision 8790).
Updated by Stanislas Rolland about 14 years ago
Attached follow-up patch will make the RTE check for the existence of the declared nested level, thus making it less brittle.
Updated by Stanislas Rolland about 14 years ago
Follow-up patch committed to SVN TYPO3core trunk (revision 8899) and branch TYPO3_4-4 (revision 8900).
Updated by Stanislas Rolland about 14 years ago
The initial patch causes unforeseen side effects such as described in issue #0016043
Updated by Stanislas Rolland about 14 years ago
Attached follow-up patch reverts the original patch. However, this issue remains resolved as it was also fixed from the RTE side.
Updated by Stanislas Rolland about 14 years ago
Seconf follow-up committed to trunk (revision 9190) and branch TYPO3_4-4 (revision 9191).