seo
seo copied to clipboard
Custom fields are not evaluated anymore using Dynamic Entry synthax in Craft 4
Description
When setting a Page Title or Page Description using the dynamic entry synthax, custom fields are not evaluated anymore in Craft 4.
This is due to an Internal change in the attributes() Element method which does not return custom fields as in Craft 3.
Steps to reproduce
- Add a field named
common_titleto a section - Set SEO Page Title as
{% if object.common_title %}{common_title}{% else %}{title}{% endif %}. - Resulting title will always be the
titlevalue. Outputing{common_title}directly will always result in a empty string.
Additional info
- Craft version: 4.0.5
- SEO version: 4.0.3
- PHP version: 8.0.18