SEOsuite not display the sitemap

Just tried the amazing Seosuite. It’s been a bliss to see those extras work together. Thanks so much for putting it out.

So the problem I have is to display the sitemap correctly.

What i did:

  1. Create a resource tpl empty
  2. Uncheck cache and richtext
  3. Put the snippet [[!SeoSuiteSitemap]] in content
  4. Set the type to XML

But the result is: This XML file does not appear to have any style information associated with it. The document tree is shown below.

Any advice would be welcome.

Ilja

I believe for every page that you want to include in your sitemap, you have to go to the tab Search engine → vertical tab Sitemap and then check the checkbox “Include this page in the sitemap?”.

Screenshot 2021-09-03 at 00-58-11 Editing Test Snippet MODX Revolution

Thanks. But that is checked by default and yes al my pages have that check. What else could it be…

Maybe you could try this:
(Temporarily) add these two lines

$query->prepare();
$this->modx->log(modX::LOG_LEVEL_ERROR,'Sitemap SQL-Query=' . $query->toSQL());

to the code after this line

This should output the SQL query (that is used for the sitemap) to the error log (when you run the snippet).
Then check the WHERE clause of the SQL query to make sure your resources meet all the conditions. Or maybe run the query in phpMyAdmin to test it.

Thanks for helping out. I’ve got this in the log:

Sitemap SQL-Query=SELECT modResource.*, SeoSuiteResource.id AS SeoSuiteResource.id, SeoSuiteResource.keywords AS SeoSuiteResource.keywords, SeoSuiteResource.resource_id AS SeoSuiteResource.resource_id, SeoSuiteResource.use_default_meta AS SeoSuiteResource.use_default_meta, SeoSuiteResource.meta_title AS SeoSuiteResource.meta_title, SeoSuiteResource.meta_description AS SeoSuiteResource.meta_description, SeoSuiteResource.index_type AS SeoSuiteResource.index_type, SeoSuiteResource.follow_type AS SeoSuiteResource.follow_type, SeoSuiteResource.sitemap AS SeoSuiteResource.sitemap, SeoSuiteResource.sitemap_prio AS SeoSuiteResource.sitemap_prio, SeoSuiteResource.sitemap_changefreq AS SeoSuiteResource.sitemap_changefreq, SeoSuiteResource.canonical AS SeoSuiteResource.canonical, SeoSuiteResource.canonical_uri AS SeoSuiteResource.canonical_uri, SeoSuiteResource.editedon AS SeoSuiteResource.editedon FROM modx_site_content AS modResource JOIN modx_seosuite_resource SeoSuiteResource ON SeoSuiteResource.resource_id = modResource.id WHERE ( ( modResource.context_key IN (‘web’) AND modResource.published = 1 AND modResource.deleted = 0 ) AND ( SeoSuiteResource.index_type = ‘1’ AND SeoSuiteResource.follow_type = ‘1’ ) AND SeoSuiteResource.sitemap = ‘1’ AND modResource.class_key != ‘modSymLink’ )

If you run this query in phpMyAdmin, do you get any results?

SELECT modResource.*, SeoSuiteResource.* 
FROM modx_site_content AS modResource 
JOIN modx_seosuite_resource SeoSuiteResource ON SeoSuiteResource.resource_id = modResource.id 
WHERE modResource.context_key IN ('web') 
AND modResource.published = 1 
AND modResource.deleted = 0
AND SeoSuiteResource.index_type = '1' 
AND SeoSuiteResource.follow_type = '1'
AND SeoSuiteResource.sitemap = '1' 
AND modResource.class_key != 'modSymLink'

If not, does this query return anything?

SELECT modResource.*, SeoSuiteResource.* 
FROM modx_site_content AS modResource 
JOIN modx_seosuite_resource SeoSuiteResource ON SeoSuiteResource.resource_id = modResource.id 

If yes, add the WHERE conditions one by one to see where it breaks.