{"action":"closed","issue":{"url":"https://api.github.com/repos/TryGhost/Ghost/issues/5589","labels_url":"https://api.github.com/repos/TryGhost/Ghost/issues/5589/labels{/name}","comments_url":"https://api.github.com/repos/TryGhost/Ghost/issues/5589/comments","events_url":"https://api.github.com/repos/TryGhost/Ghost/issues/5589/events","html_url":"https://github.com/TryGhost/Ghost/issues/5589","id":96049161,"number":5589,"title":"[Bug] Sitemap does not update when resource is deleted","user":{"login":"halfdan","id":176576,"avatar_url":"https://avatars.githubusercontent.com/u/176576?v=3","gravatar_id":"","url":"https://api.github.com/users/halfdan","html_url":"https://github.com/halfdan","followers_url":"https://api.github.com/users/halfdan/followers","following_url":"https://api.github.com/users/halfdan/following{/other_user}","gists_url":"https://api.github.com/users/halfdan/gists{/gist_id}","starred_url":"https://api.github.com/users/halfdan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halfdan/subscriptions","organizations_url":"https://api.github.com/users/halfdan/orgs","repos_url":"https://api.github.com/users/halfdan/repos","events_url":"https://api.github.com/users/halfdan/events{/privacy}","received_events_url":"https://api.github.com/users/halfdan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-20T11:59:24Z","updated_at":"2015-07-20T17:50:57Z","closed_at":"2015-07-20T17:50:57Z","body":"Deleting a Tag/User/Post does not properly update the sitemap. \r\n\r\nSteps to reproduce are simply:\r\n\r\n1. Create a Tag/Post/User (make sure it's published)\r\n2. It shows up on the `sitemap-:resource.xml` sitemap\r\n3. Delete the resource\r\n4. Sitemap does not update\r\n\r\nI did some initial digging and found that `removeUrl` (https://github.com/TryGhost/Ghost/blob/196bbfce181f8300bbcc1acb57ad9d6ff765fab8/core/server/data/xml/sitemap/base-generator.js#L137-L144) is properly called, but with the model.toJSON resulting in just `{ parent: undefined }` which subsequently fails to remove the node from the xml."}}