8000 fix: Language tabs didn't show existing content due to caching issue by filipweidemann · Pull Request #8046 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

fix: Language tabs didn't show existing content due to caching issue #8046

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

Merged
merged 5 commits into from
Oct 29, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update pagemodel.py to also include latest versions in language tabs …
…if they are unpublished or archived
  • Loading branch information
fsbraun authored Oct 29, 2024
commit 62e65809b997effb058282215492acf48f273369
2 changes: 1 addition & 1 deletion cms/models/pagemodel.py
80A8
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ def set_translations_cache(self):
self.page_content_cache.setdefault(translation.language, translation)

def set_admin_content_cache(self):
for translation in self.pagecontent_set(manager="admin_manager").current_content().all():
for translation in self.pagecontent_set(manager="admin_manager").latest_content().all():
self.admin_content_cache.setdefault(translation.language, translation)

def get_admin_content(self, language, fallback=False):
Expand Down
Loading
0