Bug #52245
closedRevert BackendUtility::BEenableFields in FAL
0%
Description
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
Fixes: #52236
Updated by Gerrit Code Review about 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24040
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24040
Updated by Gerrit Code Review about 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24040
Updated by Gerrit Code Review about 11 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24040
Updated by Gerrit Code Review about 11 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24040
Updated by Markus Klein about 11 years ago
I guess this approach will break extensions, relying on this behaviour.
What if you need the "not-enabled" records in FE too?
I think we should add a possibility to modify this behaviour on the fly by introducing some new API.
Updated by Fabien Udriot about 11 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.
https://review.typo3.org/#/c/23742/3/typo3/sysext/core/Classes/Resource/AbstractRepository.php
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.
Updated by Fabien Udriot about 11 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.
Updated by Steffen Ritter about 11 years ago
- Status changed from Under Review to Rejected