8000 [BUG] Field languages in model Page may be inconsistent · Issue #8019 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content
[BUG] Field languages in model Page may be inconsistent #8019
Closed
@jrief

Description

@jrief

Description

I currently have no receipt to reproduce this, but apparently we have an inconsistency in our database regarding the field languages in model Page.

Steps to reproduce

This currently is not reproducible, but I can explain what is happening using the Django shell:

>>> from cms.models.pagemodel import *
>>> page = Page.objects.get(id=21179)
>>> page.languages
'de'
>>> page.get_content_obj('de').language
'de'
>>> page.get_content_obj('en').language
'en'

Expected behaviour

Since the German and English page content objects are published, I would expect that page.languages == 'de,en'

Actual behaviour

page.languages == 'de'

Additional information (CMS/Python/Django versions)

Django-CMS-4.1.1

Do you want to help fix this issue?

Since this field is non-normalized, at least there should be a management command to fix it in case of data corruption.

  • Yes, I want to help fix this issue and I will join the channel #pr-reviews on the Discord Server to confirm with the community that a PR is welcome.
  • No, I only want to report the issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0