Pico 3.0: Param 'date_format' from config.yml.template leads to PHP Fatal Error
dipohl opened this issue · 2 comments
I copied config.yml.tempate to config.yml as recommended.
But this leads to white page and this PHP error:
PHP Fatal error: Uncaught Symfony\Component\Yaml\Exception\ParseException:
The reserved indicator "%" cannot start a plain scalar;
you need to quote the scalar at line 32 (near " # See https://php.net/manual/en/function.strftime.php for more info"). in /usr/share/nginx/html/pico30/vendor/symfony/yaml/Inline.php:310
When you comment out the line it works again:
#date_format: %D %T
As I don't want the default format I found a workaround in this dirty trick:
date_format: \%d-\%m-\%Y
With that the PHP error vanished, but the backslashes are visible in the HTML-output like this \20-\09-\2021
:(
Will do the better format now myself in the twig files but hope you solve the general issue sometime ~
This is a expected error when upgrading to Pico 3.0 using a newer Symfony YAML version and using an old config.yml
. You have to quote the string, e.g. `date_format: "%D %T".
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! 👍