Commit e05f0f1f authored by Frank Nägler's avatar Frank Nägler Committed by Nicole Cordes
Browse files

[BUGFIX] RTE not loading if multiple content elements are opened

This patch fixes a bug when multiple content elements are processed
at once. This happens if the edit link in page module is used to open
all elements of one column at once.

Resolves: #67400
Releases: master
Change-Id: I605cedaff8f03947363bda002ab23235693dfc50
Reviewed-on: http://review.typo3.org/40197


Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Nicole Cordes's avatarNicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes's avatarNicole Cordes <typo3@cordes.co>
parent 1c73e050
......@@ -307,16 +307,7 @@ class FormEngine {
$resultArray = $this->nodeFactory->create($options)->render();
$content = $resultArray['html'];
$this->requiredElements = $resultArray['requiredElements'];
$this->requiredFields = $resultArray['requiredFields'];
$this->requiredAdditional = $resultArray['requiredAdditional'];
$this->requiredNested = $resultArray['requiredNested'];
$this->additionalJS_post = $resultArray['additionalJavaScriptPost'];
$this->additionalJS_submit = $resultArray['additionalJavaScriptSubmit'];
$this->extJSCODE = $resultArray['extJSCODE'];
$this->inlineData = $resultArray['inlineData'];
$this->hiddenFieldAccum = $resultArray['additionalHiddenFields'];
$this->additionalCode_pre = $resultArray['additionalHeadTags'];
$this->mergeResult($resultArray);
// Hook: getMainFields_postProcess
foreach ($this->hookObjectsMainFields as $hookObj) {
......@@ -386,7 +377,19 @@ class FormEngine {
$options['renderType'] = 'listOfFieldsContainer';
$resultArray = $this->nodeFactory->create($options)->render();
$html = $resultArray['html'];
$this->mergeResult($resultArray);
return $html;
}
/**
* Merge existing data with the given result array
*
* @param array $resultArray Array returned by child
* @return void
*/
protected function mergeResult(array $resultArray) {
foreach ($resultArray['requiredElements'] as $element) {
$this->requiredElements[] = $element;
}
......@@ -413,8 +416,6 @@ class FormEngine {
foreach ($resultArray['additionalHeadTags'] as $element) {
$this->additionalCode_pre[] = $element;
}
return $html;
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment