-
-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Neos_Fusion_ParsePartials
cache not flushed for moved files because realpath
fails
#4415
Comments
Replaces neos#4509 Resolves neos#4415 After deleting a fusion file like `BrandLogo.fusion` one will face the error after booting flow and thus triggering the file monitor and its listeners: (even like a simple `flow help`) ``` Couldn't resolve realpath for: '/absolutePath/Code/core/Neos.NeosIo/Packages/Sites/Neos.NeosIo/Resources/Private/Fusion/Content/BrandLogo/BrandLogo.fusion' ``` This is caused as `realpath` returns false if the file was deleted, and we were to eager validating this. But as flows file monitor already returns absolute paths we can skip the realpath calculation here and move it to the `ParserCache::cacheForFusionFile`. Initially the call to `realpath` was made in a single place to avoid making to many assumptions about the form flow returned file paths.
Replaces neos#4509 Resolves neos#4415 After deleting a fusion file like `BrandLogo.fusion` one will face the error after booting flow and thus triggering the file monitor and its listeners: (even like a simple `flow help`) ``` Couldn't resolve realpath for: '/absolutePath/Code/core/Neos.NeosIo/Packages/Sites/Neos.NeosIo/Resources/Private/Fusion/Content/BrandLogo/BrandLogo.fusion' ``` This is caused as `realpath` returns false if the file was deleted, and we were to eager validating this. But as flows file monitor already returns absolute paths we can skip the realpath calculation here and move it to the `ParserCache::cacheForFusionFile`. Initially the call to `realpath` was made in a single place to avoid making to many assumptions about the form flow returned file paths.
ParserCacheIdentifierTrait
resolve realpath doesnt work after file move.Neos_Fusion_ParsePartials
cache not flushed for moved files because realpath
fails
The issue was reopened because, by reverting the fix #4838 (because it caused that bug) See also reminder in the code: neos-development-collection/Neos.Fusion/Classes/Core/Cache/ParserCacheFlusher.php Lines 58 to 62 in c161df2
The decision is further documented here |
Funnily enough the rather hacky fix in #4509 actually worked (which we decided against because we wanted to do things better) I have this as patch since September 23 applied in a bigger project without any problems. |
From Neos 8.3.0 .. 8.3.9 we didnt handle this case by just throwing an error.
With Neos 8.3.10 #4838 tried to fix this, but accidentally completely broke caching.
Instead the current hotfix is to silently ignore removed fusion files and not trigger cache invalidator for them.
That would lead to a growing cache and maybe odd behaviour in some cases, but that seems a better compromise.
Related issue of flows php caching not being flushed for delted classes: neos/flow-development-collection#3303
for some reason it also happened for js files???
yes because we listen to everything: #4606 (comment)
It seems that when deleting files we dont correctly handle them.
option A: flush all if it couldn't resolve?
option B: assume its already a full path and still calculate the cache identifier.
The text was updated successfully, but these errors were encountered: