55667[BUGFIX] Use `file.identifier` in search result of filelist
Commit message
Review
-
Code review CR +2
- Christian Kuhn +2
- Claus Due +1
- Michael Oehlhof +1
-
Verified V +2
- Christian Kuhn +2
- Stefan Neufeind +1
- Michael Oehlhof +1
- TYPO3com +1 CI
Issues 1
Files 1
Review log 910
-
Andreas Kienast uploaded patch set 1 02/11/18, 18:49
-
TYPO3com voted on patch set 1 V +1 02/11/18, 18:57 Completed build in 08m 36s on Sun, 11 Feb, 07:57 PM Test Summary: 30569 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-19341
-
Michael Oehlhof voted on patch set 1 V +1 CR +1 02/11/18, 19:04
-
Stefan Neufeind commented on patch set 1 V +1 CR -1 02/12/18, 00:09
It resolves the problem on master and seems okay. But the patch doesn't seem to be needed on 8.7. Also, can you say (and maybe link a patch/review/issue) when this broke? I expected during the fluid-update to 2.5.0 maybe, but that doesn't seem to be the case either. In the controller getCombinedIdentifier() on a file still seems to be available - but not in the output? -
Claus Due commented on patch set 1 02/12/18, 02:35
The problem is with the FileFacade class (from EXT:filelist). It masquerades as a File object, but it does not implement the interface nor use File as a parent class. In order to delegate the methods you can normally call on File, it uses __call() to forward the method call to an internal instance of the actual resource. IMHO this is a pretty bad implementation and would cause confusion anywhere, including if you tried passing this object to a ViewHelper which generates resource links. Fixing this template avoids the faulty facade but unfortunately hides a possibly more serious problem. -
Claus Due commented on patch set 1 CR +1 02/12/18, 02:38
To clarify: if you use ObjectAccess::getGettableProperties on FileFacade it will not expose the methods you can magically call, thus those properties do not exist when you dump an object. When you attempt to get the property, a check is made if the getter method exists - and __call is not invoked (of course not). The only way to make this truly predictable is to add the methods, in which case it also makes sense to implement the FileInterface, on FileFacade itself. Besides, we don't really like magic methods in the core in particular. This use case is one reason why. -
Stefan Neufeind commented on patch set 1 CR 0 02/12/18, 11:30
Removing my -1 as to not block it. The fix itself is okay. But I'd still suggest to go for a clean way - like having FileFacade call getCombinedIdentifier from the File instead of re-creating the identifier itself or (as Claus suggested) maybe even have FileFacade implement the FileInterface which would return in "combinedIdentifier" to be used here instead of calling it "identifier" (but only because of this facade) -
Christian Kuhn voted on patch set 1 V +2 CR +2 02/12/18, 12:17
-
Christian Kuhn merged patch set 2 02/12/18, 12:17
-
Christian Kuhn commented on patch set 2 02/12/18, 12:17
Cherry Picked This patchset was cherry picked to branch TYPO3_8-7 as commit ce9a5407c64b3944ad37dd4948b97e18768db6bd