Closed andysh-uk closed 2 years ago
As I thought, the following changes worked (I've made these in my own template, but will send a proper PR for the default template):
In templates\sitemap.xml.twig
, line 56 becomes:
{% if (record.definition is defined and record.definition.locales.all|length > 1) %}
and line 61 becomes:
{% if (record.definition is defined and record.definition.locales.all|length > 1) %}
I've just installed v1.2.1 on Bolt 5.1.4, and with the default template, there is a PHP error (variable "record" does not exist) when including taxonomies.
Commenting out the "taxonomies" line above gets it working.
Line 56 is:
I suspect this just needs a similar "record is defined" check like the
lastmod
line previously. I'll look to submit a PR in the next couple of days unless someone beats me to it.