[TYPO3-core] FAL: connecting non-hierarchical file database with metadata in TYPO3 db

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Aug 29 11:25:00 CEST 2014

Hey folks,

this is merely addressed to the FAL team, but everybody is free to 
comment. Cross-posted in TYPO3-dev.

I'm currently implementing a custom FAL driver to connect TYPO3 to a 
non-hierarchical and readonly file database/cloud from a customer. Every 
file used in TYPO3 from there MUST NOT be processed locally so that only 
the remote database is delivering the scaled images etc. This itself is 
already working fine using some workarounds, but I'm having quite some 
issues in regards to metadata.
The core is unfortunately heavily relying on sys_file_metadata and in 
some places also directly making use of the metadataRepository instead 
of going the object oriented way and asking the file objects for the 
demanded properties. And this is my main issue at the moment. I'm not 
able to let TYPO3 sync/index all the files from this file database 
(product images, ...) and keep them synced with their metadata. Indexing 
on demand is fine, so that the refindex is working, but 
sys_file_metadata records should not be created and always come from 
remote database/fileObject.

Having this usecase scenario and having poked around in FAL a bit, I 
have the following questions now:

a) are there pans to allow for custom classes implementing
    the File/FolderInterface
    (which I currently have to hack in via XCLASS)
b) is it desired to exclusively work with FAL File objects
    throughout the core, where the main issue from me ATM is the
    "placeholder" feature of file references I have to fix
c) do you see any other solution/workaround for my usecase
    instead of XCLASSing by using stock features?
d) why is metadataRepository->findByFileUid() creating a
    database record if nothing was found? This is
    creating tons of dead DB records. This should only be done
    if one want's to edit the metadata record or the
    metadata extractors are populating the DB - not during
    only listing some files

For now I'll XCLASS the shit out of it to get the job done in time, but 
if the team is considering to improve the core towards my current 
demands, I'll see if I can come up with some patches in this regard
(already sent a patch set to forge fixing the edit/copy/delete/... icons 
in FAL filelist and context menus if those actions are not allowed 
because of missing file permissions)

Nevertheless, please let me know your opinions on the questions above. 

kind regards,
Franz Koch

More information about the TYPO3-team-core mailing list