Skip to content

Commit

Permalink
Merge pull request #110 from plone/master_fix_issue_91
Browse files Browse the repository at this point in the history
Fix sitemap.xml.gz for plone.app.multilingual (>= 2.x)
  • Loading branch information
jensens authored Dec 30, 2016
2 parents 42187ca + dc5bf98 commit b219090
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ Changelog

Breaking changes:

- *add item here*
- Fix sitemap.xml.gz for plone.app.multilingual (>= 2.x) but breaks it for
LinguaPlone and plone.app.multilingual 1.x
If this is a problem then please see bedbfeb67 on 2.5.x branch for how to
maintain compatibility with these products.
[djowett]

New features:

Expand Down
4 changes: 2 additions & 2 deletions plone/app/layout/sitemap/sitemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def objects(self):

query['is_default_page'] = True
default_page_modified = OOBTree()
for item in catalog.searchResults(query, Language='all'):
for item in catalog.searchResults(query):
key = item.getURL().rsplit('/', 1)[0]
value = (item.modified.micros(), item.modified.ISO8601())
default_page_modified[key] = value
Expand All @@ -78,7 +78,7 @@ def objects(self):
}

query['is_default_page'] = False
for item in catalog.searchResults(query, Language='all'):
for item in catalog.searchResults(query):
loc = item.getURL()
date = item.modified
# Comparison must be on GMT value
Expand Down

0 comments on commit b219090

Please sign in to comment.