Closed zizther closed 6 months ago
Turns out I can use now
instead of date.
Good to see that the error message also comes up when trying to save the file as well, nice touch 👍
Glad you got it sorted
Something seems not right to me though, I just tested this and it renders just fine on my Craft 5 install? date
is a valid function in Twig: https://twig.symfony.com/doc/3.x/functions/date.html
The current SEOmatic has this set to:
# (required) Expiration date for the security information herein
Expires: {{ date('+1 year')|atom }}
I can confirm this is working for me. The issue was probably the date_modify filter on the date variable itself
Describe the bug
I have updated from Craft 4 to 5, and noticed when trying to access the security.txt file it throws an error when trying to output the date variable
Error rendering template string -> Variable "date" does not exist in "__string_template__d8deee3dfbc2e869189223d106d1f549" at line 6.
Expiration: {{ date|date_modify("+1 month")|atom }}
Versions