Cannot reference entity with status 0

Created on 21 December 2016, over 8 years ago
Updated 28 January 2025, 3 months ago

When a non user 1 administrator selects an image entity with status 0, and saves the node.
A validation error is shown that that file cannot be referenced.

If a file is removed from an entity, and it is no longer used elsewhere, drupal will set the status to temporary.
That means that files that are no longer used will be deleted after a period of time.

It is however not possible to add the file to another entity once it has the temporary status.

For user one everything works fine, but other users cannot reference the temporary image.

Steps to reproduce:

  1. Create a entity browser widget for files, make sure that temporary files are available in the view for selecting entities.
  2. Add a image field on a node, and use the entity browser widget as the form plugin.
  3. Ass another user than user 1, add a new node, and upload a new image in the entity browser widget.
  4. Save the node.
  5. Edit the node, and remove the previous uploaded image inside its field on the node edit page.
  6. Save the node.
  7. Edit the node, and add the same image using the select tab from the entity browser widget.
  8. Try to save the node
🐛 Bug report
Status

Active

Component

User interface

Created by

🇧🇪Belgium svdhout

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024