nephila / djangocms-blog

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks
https://djangocms-blog.readthedocs.io
BSD 3-Clause "New" or "Revised" License
403 stars 190 forks source link

Field for "TEXT" is missing in most add/edit views but not in all #656

Closed Spidiffpaffpuff closed 3 years ago

Spidiffpaffpuff commented 3 years ago

I'm running djangocms 3.8.0 with Django 3.1.4 and Python 3.9.

I have installed djangocms blog and it's mostly working except for the display of the "TEXT" field. When I try to add a new blog post via the blog dropdown menu on the left of the toolbar, I get the full add form except for the "TEXT" field. When I try to edit a preexisting blog post, the "TEXT" field is missing. However if I use the "Create" button on the right side of the toolbar and choose new article, I get the full add form including the "TEXT" field. This is the only way I can create a blog post with actual text. However, even when I create a blogpost like this, I cannot edit the text afterwards as in the edit form, the "TEXT" field is missing.

yakky commented 3 years ago

@Spidiffpaffpuff by default djangocms-blog uses plugin based content, so no text field is provided in the changeform but you can add text (and much more!) via the django-cms plugin system

See the relevant documentation (the links to the django CMS documentation at the top of https://djangocms-blog.readthedocs.io/en/latest/installation.html#installation ) about how working with the django CMS plugins

Alternatively you can set BLOG_USE_PLACEHOLDER=False (https://djangocms-blog.readthedocs.io/en/latest/autodoc/settings.html#djangocms_blog.settings.BLOG_USE_PLACEHOLDER) and you will get a plain text field to add the post content

Spidiffpaffpuff commented 3 years ago

Thank you for your answer. I was unsure whether this behavior was intended. I will try out setting BLOG_USE_PLACEHOLDER to False and see how it changes the appearance.

However, here's some things I would like you to consider. When a user tries to edit a blogpost through the backend, they will find a form with a textfield, that looks just like the "TEXT" field. Except it is the field for "ABSTRACT". So they will open the article for editing and be confrontend with an empty text field while the text field for "TEXT" remains invisible. It might give users the impression that the system lost their text. I know that Django CMS offers the ability to edit things on the front end. And I realized that I can still edit the text, just from the front end, not from the back end. It's just that I'm an IT geek. Workaournds like that are rather obvious to me, but they might not be at all obvious for non geek users. Especially when they have experience with another CMS with backend editing, but no experience with Django CMS. Also, when I go to edit an article from the backend, all it's properties are there, except for the "TEXT". I can change the title, and just about everything else, except for the text. It seems unnecessarily obfuscated to me.

I could provide some screenshots if the way I'm describing the users perspective is not comprehensible.

yakky commented 3 years ago

@Spidiffpaffpuff I see your point of view and I am eager to discuss how to improve the experience and the documentation in this regard.

Unfortunately django CMS does not allow to edit plugin content from the admin (which is still regarded as the primary way to edit content on djangocms-blog) and thus we can't add this back into the admin changeform. For this reason the default templates implemented the render_model* (http://docs.django-cms.org/en/latest/reference/templatetags.html?highlight=render_block#render-model) templatetag to bring the changeform editing experience in the frontend, as the other way around is not possible.

One possible help to clarify this is to add a statement and a link in the changeform where the text it's supposed to be, to inform the user about the feature and link the blog post frontend editing mode.

What would you think?

Spidiffpaffpuff commented 3 years ago

I want to make sure that we really are talking about the same thing so I made a couple of screenshots after all. create1 create2 This is the form I get when I click on the Create-Button on the right. It shows all the fields. Now after having created the article, I try to edit it from the button to the very top right. edit_from_right It shows only the field for "TEXT". When I use the dropdown menu on the right "Blog -> Edit Post" I get all the fields except "TEXT". So let's say I had written an article last week. There's a new development, so I want to include an update. I also realized that I forgot to associate the article with a category. In this case, I would have to edit the article twice in different places. Through front end editing, I cannot access the meta properties, only the title and the text. So no matter what approach I use, I have to edit the article twice. Once to update the text and once to update the meta info category. However, at this point I still have little experience with Django CMS and maybe I should get more aquainted to it. Sometimes things feel strang in the beginning and later on you don't want to miss them... I think this issue can be closed at this point. Maybe I'll get back to you at a later point. Thanks for the kind exchange. 👍

yakky commented 3 years ago

@Spidiffpaffpuff thanks for the update the "Create" button triggers the django CMS wizard which has a custom form and (to make the story short) it allows to add a text field which is created as a text plugin when the form is saved. Sadly, this does not work on editing, so, yes, in this case you have to edit the post twice if you want to edit the content and its metadata. Based on my experience this is seldom the case, and most of the time you will work on content only. The bonus of the django CMS plugins is that you can have a much richer layout (mixing text, images, video and so on) which would be much harder than using a single text field. If you don't need this flexibility, you can disable the plugins and have the text directly in the admin form by setting BLOG_USE_PLACEHOLDER=False, which is intended for the uses cases where plugins would be more a burden than a benefit