Could not open php error stream while loading stories from storyblok in twig
I am currently using the silex template from the realblok github repository where I download the stories via a function getStories
.
My code looks like this:
{%
set reference = getStories(global('references_path'), 1, 0, options('{"filter_by[customer_name]":"' ~ item.customer_name ~ '"}'))
%}
This code is called from another branch component in a loop.
For one "link" I get this error message:
file_put_contents (../kesh//c3RvcnlibG9rOnN0b3JpZXMvYTo0OntpOjA7czoxMDoiRXJkZ2FzIE/DliI7aToxO3M6MTE6ImRlL3Byb2pla3RlIjtpOjI7aToxO2k6MztzOjM6ImZzcCI7fQ ==): failed to open stream: No such file or directory in /webapp/vendor/apix/cache/src/Files.php
Seems to be a cache issue.
Thanks in advance.
source to share
The path that will be created in your case contains /
. So PHP cannot create the file because it will be in a non-existing folder.
We can see that this problem is in Files.php
Apix/Cache
which we are using to allow various caching options for the silex template. However, we have found a way to fix this issue so far - but we will create a new pull request for Apix/Cache
, so it will check /
before saving.
For you this means:
composer update
to install our new php-client version v1.1.11 .
source to share