Problem

Removing image files in the form is an elementary feature by Drupal core for editors to replace existing media with other images. Without this, editors can't replace image files of existing media entity items directly in the article forms. They're used to work this way, and this way is both convenient and efficient. Now they need to go detours for these cases, which costs both time and loses the focus on editing the main content.

I also don't see the reason to remove this button. It seems that by removing this button in #2900663: Removing the 'Remove' button of image widgets, only the symptom of the source problem has been suppressed. The main problem has not been solved by this.

Proposed solution

Revert the changes being made in #2900663: Removing the 'Remove' button of image widgets.

CommentFileSizeAuthor
#5 Screenshot 2017-09-08 um 14.17.01.png117.27 KBmxh

Comments

mxh created an issue. See original summary.

volkerk’s picture

The main reason behind removing the ability to delete the image from a media entity inside the paragraph form was that it is not obvious to the editors that removing / changing the image of a media entity is changing it system wide. A media entity can be embedded on multiple places in the system, changing it inside a paragraph form is not only changing it for the paragraph respectively the node which is edited.

I suppose the editors could just remove the media entity from the paragraph and select or upload another image via entity browser easily.

mxh’s picture

The main reason behind removing the ability to delete the image from a media entity inside the paragraph form was that it is not obvious to the editors that removing / changing the image of a media entity is changing it system wide.

This isn't solving the problem that the editor doesn't know the item would be changed system-wide and might be referenced by multiple instances. The editor is still capable of changing any other fields of the media item in the inline form, which would change the item system-wide as well.

Possible ways to prevent missing or wrong understandings of the system could be documentation-related either by a user manual or a notice / description inside the form about the consequences of the user's possible actions.

I suppose the editors could just remove the media entity from the paragraph and select or upload another image via entity browser easily.

It's neither convenient nor efficient to go this alternative way, especially for cases when the image file needs to be replaced on an existing media item, which has many other fields an values like label, description, tags etc. All these values need to be manually copy-pasted when removing and re-adding a new media item via inline entity form. Another alternative way could be to look for the media item in the media overview and edit it there, but then the editor needs to go this detour - which isn't convenient either.

daniel.bosen’s picture

We are discussing this heavily at the moment. In my opinion a possible proper solution would be to

a) make a distinction between hard and soft properties and
b) make the soft properties editable in the paragraph only (and not use inline entity form). Hard properties can only be replaced in the paragraph as a whole and only edited in the media edit form itself

Hard properties would be those properties that are directly tied to each other.
E.g.:

  • The actual image
  • Copyright
  • Source
  • Expire date

Soft properties would be properties, that could possibly different on each article.
E.g.

  • Alt text
  • Title text
  • Description

When a Image media entity is selected from the media browser, the hard entities would only be shown to the editor, but the soft properties would be copied to corresponding paragraph fields and thus be freely editable in the current context without affecting the media entity properties.

This would be architecturally saner then the current approach, and it would add the formerly not existing feature of having the soft entities editable per article (or usage).

But of course you would not get back the previous use case, that you could just click on the file upload button to change the image with two clicks, but this is insane in my opinion anyway.

Any thoughts?

mxh’s picture

StatusFileSize
new117.27 KB

Hard properties... soft properties

Interesting approach, which could make sense for images being shared on multiple instances with different appearance / usage. For my main project it's currently not a common use case though.

This would be architecturally saner then the current approach, and it would add the formerly not existing feature of having the soft entities editable per article (or usage).

It can be done, but it certainly adds a lot more complexity by copying data over. Also, there might be cases where the increase of redundancy is not welcome or even a break with existing requirements regards data integrity. To overcome this, you'd need something like a configurable definition of hard and soft properties (fields), and make this whole feature optional.

But of course you would not get back the previous use case, that you could just click on the file upload button to change the image with two clicks, but this is insane in my opinion anyway.

I don't really see a problem here with the button, which already exists for a very long time and it seems people are used to it.

Any thoughts?

Considering the main problem trying to be solved, which is:

The main reason behind removing the ability to delete the image from a media entity inside the paragraph form was that it is not obvious to the editors that removing / changing the image of a media entity is changing it system wide.

I'd try to dissolve wrong assumptions of how the system works with a document-related approach via UI. Example: Showing an obvious information about the usage of the media item being edited. Attaching a conceptual screenshot of what I mean. A further link to an overview which might get opened via modal could be helpful as well. By adding this information to the table, the user might come to the right understanding of possible coherences inside the underlying data structure.

daniel.bosen’s picture

To have a quick solution we will add a configuration option to turn the upload on and of, for now.
Counting is still broken in media entity, so the documentation approach is not very accurate.

chr.fritsch’s picture

daniel.bosen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.