diff --git a/typo3/sysext/version/Classes/Dependency/ElementEntity.php b/typo3/sysext/version/Classes/Dependency/ElementEntity.php index d7c18a8..25b44d2 100644 --- a/typo3/sysext/version/Classes/Dependency/ElementEntity.php +++ b/typo3/sysext/version/Classes/Dependency/ElementEntity.php @@ -330,12 +330,18 @@ class ElementEntity { * @return array */ public function getRecord() { - if (empty($this->record['uid']) || (int)$this->record['uid'] !== $this->id) { + if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] && (empty($this->record['uid']) || (int)$this->record['uid'] !== $this->id)) { $this->record = array(); - $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,pid,t3ver_wsid,t3ver_state,t3ver_oid', $this->getTable(), 'uid=' . $this->getId()); - if (is_array($rows)) { - $this->record = $rows[0]; + $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid,pid,t3ver_wsid,t3ver_state,t3ver_oid', $this->getTable(), 'uid=' . $this->getId()); + if (is_array($row)) { + $this->record = $row; } + } else { + $this->record = array(); + $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid,pid', $this->getTable(), 'uid=' . $this->getId()); + if (is_array($row)) { + $this->record = $row; + } } return $this->record; } diff --git a/typo3/sysext/version/Classes/Dependency/ElementEntityProcessor.php b/typo3/sysext/version/Classes/Dependency/ElementEntityProcessor.php index 330f2d1..c1d8e6c 100644 --- a/typo3/sysext/version/Classes/Dependency/ElementEntityProcessor.php +++ b/typo3/sysext/version/Classes/Dependency/ElementEntityProcessor.php @@ -88,7 +88,7 @@ class ElementEntityProcessor { */ public function createNewDependentElementChildReferenceCallback(array $callerArguments, array $targetArgument, ElementEntity $caller, $eventName) { $fieldConfiguration = BackendUtility::getTcaFieldConfiguration($caller->getTable(), $callerArguments['field']); - if (!$fieldConfiguration || !GeneralUtility::inList('field,list', $this->getDataHandler()->getInlineFieldType($fieldConfiguration))) { + if (!$fieldConfiguration || ($fieldConfiguration['type'] !== 'flex' && !GeneralUtility::inList('field,list', $this->getDataHandler()->getInlineFieldType($fieldConfiguration)))) { return ElementEntity::RESPONSE_Skip; } return NULL; @@ -105,7 +105,7 @@ class ElementEntityProcessor { */ public function createNewDependentElementParentReferenceCallback(array $callerArguments, array $targetArgument, ElementEntity $caller, $eventName) { $fieldConfiguration = BackendUtility::getTcaFieldConfiguration($callerArguments['table'], $callerArguments['field']); - if (!$fieldConfiguration || !GeneralUtility::inList('field,list', $this->getDataHandler()->getInlineFieldType($fieldConfiguration))) { + if (!$fieldConfiguration || ($fieldConfiguration['type'] !== 'flex' && !GeneralUtility::inList('field,list', $this->getDataHandler()->getInlineFieldType($fieldConfiguration)))) { return ElementEntity::RESPONSE_Skip; } return NULL;