Project

General

Profile

Bug #101607

Updated by S P over 1 year ago

When loading an extension via composer using a local path (not from a repo, not from packagist, but from a real local path), then this extension is only symlinked inside the vendor folder to the real path. @GeneralUtility::getFileAbsFileName@ will then return the absolute symlinekd path, not the absolute real path. 
 
 I discovered this like this: when doing something like this in @ext:form@ inside such a symlinked extension: 

 <pre><code class="yaml"> 
 persistenceManager: 
     allowedExtensionPaths: 
         sitePackage: EXT:my_site_package/Configuration/FormDefinitions/ 
 </code></pre> 

 it fails. This is because in @FormPersistenceManager@ around line 477 the existence of this path is checked with PHP method @file_exists@. This methods always returns false for symlinks, however. And this in turn is because @GeneralUtility::getFileAbsFileName('EXT:my_site_package/Configuration/FormDefinitions/')@ resolves the absolute path to the symlinked vendor folder (@vendor/my_vendor/my_site_package@ (@vendor/my_site_package@ is a symlink to its real location) and not the real absolute one. 

 The form example is just an example, this will fail whenever using @file_exists@ on such a symlinked location. 

 @GeneralUtility::getFileAbsFileName@ must take symlinks into account and also resolves these. Only then it really returns an absolute path.

Back