8000 [BUG] Frontend-editing of regular model fields fails for versioned models · Issue #7996 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content
[BUG] Frontend-editing of regular model fields fails for versioned models #7996
Closed
@fsbraun

Description

@fsbraun

Description

Frontend-editable fields are model fields that can be edited by double-clicking in the frontend.

As described in fsbraun/djangocms-blog#5, this fails for editing single fields.

django CMS core would need to check if the admin_manager is available for the model, and if so, use it. Otherwise, the objects manager will hide any unpublished fields (and published fields are not editable in the first place).

Steps to reproduce

  1. Install a versioned app with frontend-editable fields (e.g. djangocms-blog)
  2. Make sure that you have a template where only selected fields can be edited. They need to include the template tag {% render_model post_content "post_text" "post_text" %}. At least three parameters are necessary, so that the single field edit endpoint is triggered. (in djangocms-blog, disable the use of placeholders for the blog app)
  3. Create an unpublished object and view it.
  4. Double-click on the field
  5. See error

Expected behaviour

FrontendEditableAdminMixin._get_object_for_single_field needs to check for admin_manager.

Actual behaviour

FrontendEditableAdminMixin._get_object_for_single_field uses objects manager.

Screenshots

Additional information (CMS/Python/Django versions)

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

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0