vaersaagod/seomate

Solspace Calendar URLs in Sitemap

Closed this issue · 1 comments

I've got Calendar events showing up in a sitemap, so that is working, with:

'games' => [
                'elementType' => \Solspace\Calendar\Elements\Event::class,
                'criteria' => [
                    'calendar' => 'varsity',
                    'rangeStart' => date('Y').'-01-01',
                    'rangeEnd' => date('Y').'-01-01'
                ],
                'params' => [
                    'changefreq' => 'weekly',
                    'priority' => 0.9
                ]
            ]

The output is:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<!-- Created on: 2021-09-29 11:26:57 -->
<url>
<loc/>
<lastmod>2021-09-18T07:57:26-07:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc/>
<lastmod>2021-09-18T08:08:37-07:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>
<url>
<loc/>
<lastmod>2021-09-26T10:07:36-07:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.9</priority>
</url>
...
</urlset>

As you can see, the url item is missing. I am unsure how to specify this in seomate.php, or if it should be added automatically? I do have the URI specified with a template in the calendar settings, so I think everything should be in place https://d.pr/i/KEP49F

Haven't used Solspace Calendar myself, but the only thing SEOMate does is $element->url. So if the element has an URL, it should return it. Could it be something simple like caching that's messing up things? Tried clearing the SEOMate cache?