Skip to content

[BUG] PageContent.DoesNotExist on first page via show_placeholder #8271

@wfehr

Description

@wfehr

Description

When creating the first page, the show_placeholder-tag throws an exception.
If you "publish" the page via admin interface you can view/edit the page again without any problems.
(maybe only occurs if djangocms-versioning is used as well?)

Steps to reproduce

  • fresh install with no created pages
  • create a template containing "show_placeholder"
  • create your first page -> throws error

Also reproducable with django-cms-quickstart on its main branch:

  • insert show_placeholder "Content" request.current_page into minimal.html for example
  • create first page
  • first view of page works -> now change the template to "minimal" => error

Expected behaviour

should load the page without an exception.

Actual behaviour

throws "PageContent.DoesNotExist"-exception here because of the "get_placeholders"-call.

Additional information (CMS/Python/Django versions)

  • django 5.x
  • cms 5.x
  • djangocms-versioning>=2.x

Do you want to help fix this issue?

  • 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

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions