Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sparkly-experts-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"apostrophe": patch
---

Sites with a custom filterByIndexPage method no longer experience failures in the sitemap module and potential creeping CPU performance penalties. A regression introduced with our static site support, but not specific to static sites.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,14 @@ module.exports = {
return metadata;
}
const [ pm ] = metadata;
// indexQuery is designed to be called with the
// index page in question as req.data.page. To
// reuse it for URL metadata purposes we must
// meet that expectation
const pageWas = req.data.page;
req.data.page = doc;
const query = self.indexQuery(req);
req.data.page = pageWas;
const filters = await self.getFiltersWithChoices(query, { allCounts: true });

// 1. Enumerate every filter + choice combination
Expand Down
Loading