browsermedia/browsercms — Issue #478: Sitemap errors after upgrading to 3.3.x
Author: peakpg
Created: 2012-02-13 17:43:42+00:00
State: open

This is caused by left over section nodes that didn't have a matching section object in the sections table. The workaround is to run the following query to join sections and section_nodes.

``` SQL
SELECT * FROM section_nodes left join sections on section_nodes.node_id = sections.id WHERE section_nodes.node_type = "Section"
```

Any NULL sections means the section node can be safely deleted. So long as every section node has a matching section, the sitemap should work.

## Root Cause

At this point, its not know what caused the section nodes to be orphan'd. It's possible an older version of BrowserCMS didn't correctly delete both rows when deleting a section. However, that doesn't seem to be an issue anymore, so this should probably only occur during this upgrade.