Hi,
I’ve got a weird problem where EE is changing the output of a variable during parsing. I’m trying to generate a Google Sitemap XML file.
I’ve assigned a variable at the top of my xml file.
{assign_variable:lastmodDate="{exp:stats}{last_entry_date format='{DATE_W3C}'}{/exp:stats}"}
Which works fine with:
<url>
<loc>http://www.example.com/examplegroup/template/C11/</loc>
<lastmod>{lastmodDate}</lastmod>
<changefreq>weekly</changefreq>
1.0</priority>
</url>
which outputs:
<url>
<loc>http://www.example.com/examplegroup/template/C11/</loc>
<lastmod>2008-07-12T17:57:26+01:00</lastmod>
<changefreq>weekly</changefreq>
1.0</priority>
</url>
But with the following it gets weird:
{exp:weblog:categories weblog="eintraege" show_empty="yes" style="linear" category_group="4" disable="categories|member_data|pagination|trackbacks"}{if type != "level1Heading"}
<url>
<loc>{site_url}examplegroup/template/C4/tag/<?php echo(rawurlencode("{category_name}"));?></loc>
<lastmod>{lastmodDate}</lastmod>
<changefreq>weekly</changefreq>
0.5</priority>
</url>
{/if}{/exp:weblog:categories}
output is:
<url>
−
<loc>
<a href="http://www.example.com/examplegroup/template/C4/tag/Hotels">http://www.example.com/examplegroup/template/C4/tag/Hotels</a> & Motels
</loc>
<lastmod>M00o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr</lastmod>
<changefreq>weekly</changefreq>
0.5</priority>
</url>
PHP parsing is set to output stage. Though I checked by removing the php-statement and the error still occurs. Why could the variable {lastmodDate} change it’s content to “M00o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr”?