Bug #94119
closedGhost record for field with mm relation when relation record is disabled
100%
Description
Since the update from TYPO3 10.4.15 to 10.4.16 I have "ghost" records with uid=0 and pid=0 in a "related" field when referenced records are disabled.
The TCA configuration:
'related' => [ 'label' => 'Related', 'config' => [ 'type' => 'select', 'renderType' => 'selectMultipleSideBySide', 'foreign_table' => 'tx_video_domain_model_video', 'foreign_table_where' => ' AND tx_video_domain_model_video.pid = ###REC_FIELD_pid### AND tx_video_domain_model_video.uid != ###THIS_UID### ORDER BY title', 'MM' => 'tx_video_domain_model_videos_related_mm', 'MM_opposite_field' => 'related_from', 'size' => 5, 'minitems' => 0, 'maxitems' => 100, 'behaviour' => [ 'allowLanguageSynchronization' => true, ], ], ], 'related_from' => [ 'label' => 'Related from', 'config' => [ 'type' => 'group', 'internal_type' => 'db', 'foreign_table' => 'tx_video_domain_model_video', 'allowed' => 'tx_video_domain_model_video', 'size' => 5, 'maxitems' => 100, 'MM' => 'tx_video_domain_model_videos_related_mm', 'readOnly' => 1, ], ],
In the domain model the relevant fields are defined as:
/** * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\MyVendor\Video\Domain\Model\Video> */ protected $related; /** * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\MyVendor\Video\Domain\Model\Video> */ protected $relatedFrom; /** * Get related videos * * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\MyVendor\Video\Domain\Model\Video> */ public function getRelated() { return $this->related; }
The getRelated() method returns then this "ghost" record for every related record which is disabled:
Going back to TYPO3 10.4.15 only enabled records are available.
Edit: Looks like it is not related to bidirectional fields, just ol' plain relations.
Files
Updated by Chris Müller over 3 years ago
- Has duplicate Bug #94141: Hidden records are taken into account in m:n relations but instantiated as empty objects added
Updated by Chris Müller over 3 years ago
- Subject changed from Ghost record for field with bidirectional mm relation when relation record is disabled to Ghost record for field with mm relation when relation record is disabled
- Description updated (diff)
Updated by Markus Klein over 3 years ago
- Related to Bug #88919: QueryBuilder with DefaultRestrictionContainer effectivly transforms outer joins to inner joins because the restrictions are applied to all join tables unconditionally added
Updated by Markus Klein over 3 years ago
- Status changed from New to Accepted
- Assignee set to Markus Klein
- Priority changed from Should have to Must have
- Target version set to next-patchlevel
- Complexity set to medium
Confirmed. Albeit this is actually the proof that the leftJoins where broken formerly and that even Extbase had dirty workarounds in place.
Updated by Gerrit Code Review over 3 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69177
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69177
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69177
Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69177
Updated by Gerrit Code Review over 3 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69177
Updated by Markus Klein over 3 years ago
- Related to Bug #91324: Visibility restrictions are added twice for Extbase ObjectStorage relations added
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69198
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69199
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69199
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69199
Updated by Markus Klein over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b1175c904dd2fffb417af0380718dae06728d825.