Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitemap is broken #6

Open
MacLake opened this issue Oct 10, 2024 · 1 comment
Open

Sitemap is broken #6

MacLake opened this issue Oct 10, 2024 · 1 comment

Comments

@MacLake
Copy link

MacLake commented Oct 10, 2024

Description

The creation of a sitemap for blog posts is aborted with an error.

Steps to reproduce

Add BlogSitemap to your sitemaps:

sitemaps: dict = {
    'cmspages': ExtendedSitemap,
    'blog': BlogSitemap,
    # …
}

Versions

Python 3.11, Django 5.1.2, django CMS 4.1.3, djangocms-blog commit 4efe3ba

Additional information

I’ve taken a look into the code. The problem is that Post used to be a TranslatableModel (django-parler), but isn’t anymore, so that posts = Post.objects.translated(lang).language(lang).published() doesn’t work anymore. Replacing that line with posts = Post.objects.filter(publish=True) works, but there’s no language selection in it, and then the next error happens just some lines later with smart_override which is also a django-parler function.

I wanted to fix this issue, but I think I’m lacking the insight of the data model and the replacement of django-parler TranslatableModel for Post.

@fsbraun
Copy link
Owner

fsbraun commented Nov 11, 2024

fixed by 3ab96c4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants