Revert BackendUtility::BEenableFields in FAL
Quite recently, in https://review.typo3.org/#/c/23742/, method
BackendUtility::BEenableFields was introduced in FAL.
This has a drawback for third party extensions which are introducing
additional enabledFields for a File. As instance, Media has the "hidden"
flag enabled. Consequently, FAL is not anymore capable of finding a
File that has hidden = 1 ; $fileRepository->findByUid(123) is raising
exception #1314354065 whenever file "123" is marked as hidden.
Since we don't have Query Settings like in Extbase, the patch
removes this constraint following the List module practice which
displays all records except the deleted ones.
Releases: 6.0, 6.1, 6.2
#7 Updated by Fabien Udriot almost 6 years ago
I guess this approach will break extensions, relying on this behaviour.
What if you need the "not-enabled" records in FE too?
FE? Please read carefully the commit message. This patch only addresses the BE (and does not touch the FE in any means).
Look at the method
getWhereClauseForEnabledFields in this patch which clearly makes the distinction btw BE and FE.
Furthermore, before the patch was merged (14 days ago) the behaviour was the opposite and is currently breaking Media @see #52236
I think we should add a possibility to modify this behaviour on the fly by introducing some new API.
As somehow expressed in the commit message, we could have this but it is the kind of thing that requires time. To quickly have Media fixed (and other extensions if they use this in the BE), I would prefer to have the default behaviour of the List module: list everything regardless of starttime, endtime, disable except the deleted flag.
#8 Updated by Fabien Udriot almost 6 years ago
This issue can be abandoned. It has been discussed that enable fields don't suit in the FAL concept where a file record is a strict representation of a file. With the new "sys_file_metadata" in 6.2, some fields like "visible" have been introduced for controlling visibility on the FE by a gallery plugin as example.