Bug #86276
closedCounting LazyObjectStorages doesn't return the expected result
0%
Description
I'm having trouble with the counting of `ObjectStorages` and just wanted to report an obscure behaviour I encountered.
Iterating over records in Fluid works as expected, but counting them is not possible as you can see in the attached screenshot. The Debugger and every manually invoked "counting" (in fluid, or in the controller code) of the `members`-property returns 18 which is the correct count of members including the translations.
But I'm only interested in the "real" count, as you can see, there are only 6 objects in the members' `LazyObjectStorage` and the corresponding list is only rendering 6 items in the default language.
This problem is LazyObjectStorage specific, removing the `@lazy` annotations does return an ObjectStorage with the same members but the correct count.
The TCA annotation looks like the following, although I think Extbase doesn't really respect that at that point:
'members' => [
'exclude' => 1,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:cmb_members/Resources/Private/Language/locallang_db.xlf:tx_cmbmembers_domain_model_orgunit.members',
'config' => [
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'foreign_table' => 'tx_cmbmembers_domain_model_member',
'foreign_field' => 'status',
'foreign_table_where' => 'AND tx_cmbmembers_domain_model_member.sys_language_uid === 0',
],
],
Files