Skip to content

Commit

Permalink
[BUGFIX] Do not try to copy deleted records (FluidTYPO3#1719)
Browse files Browse the repository at this point in the history
When trying to copy child records, do not copy deleted ones.

Close: FluidTYPO3#1704
  • Loading branch information
cweiske authored and NamelessCoder committed Oct 10, 2019
1 parent c025d9f commit 8de6843
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use FluidTYPO3\Flux\Utility\ColumnNumberUtility;
use TYPO3\CMS\Core\Cache\CacheManager;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
Expand Down Expand Up @@ -350,7 +351,8 @@ protected function getParentAndRecordsNestedInGrid(string $table, int $parentUid
$languageField = $GLOBALS['TCA'][$table]['ctrl']['languageField'];

$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
$queryBuilder->getRestrictions()->removeAll();
$queryBuilder->getRestrictions()->removeAll()
->add(GeneralUtility::makeInstance(DeletedRestriction::class));

$query = $queryBuilder->select(...GeneralUtility::trimExplode(',', $fieldsToSelect))
->from($table)
Expand Down

0 comments on commit 8de6843

Please sign in to comment.