Closed
Description
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
- Install a versioned app with frontend-editable fields (e.g. djangocms-blog)
- 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) - Create an unpublished object and view it.
- Double-click on the field
- 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
Projects
Status
Done