The file used in the Image field may not be referenced error when trying to edit and save image properties

Created on 11 October 2021, about 3 years ago
Updated 21 February 2023, almost 2 years ago

Problem/Motivation

I have been getting the following error when trying to edit the image properties of the image uploaded using the Ckeditor.

The file used in the Image field may not be referenced.

Steps to reproduce

  1. Added the IMCE File Manager widget in 'Text formats and editors' > 'Full HTML' active toolbar.
  2. Enabled Filters - Align images, Caption images, Correct faulty and chopped off HTML, and Track images uploaded via a Text Editor.
  3. Uploaded an image using the widget and opened the image properties popup and on saving any changes, I get the above mentioned error.

Drupal Version : 9.1.9
IMCE Version : 8.x-2.4

Kindly note that the image after upload is being managed.

Any help with the same is much appreciated.

πŸ’¬ Support request
Status

Active

Version

2.4

Component

User interface

Created by

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.

  • πŸ‡ΊπŸ‡ΈUnited States kwfinken Lansing, MI

    Using 3.0.7 and still running into this issue.

    • I have NO filters enabled.
    • This only happens when uploading a new file through IMCE, it works fine when using a file that was already on the server..
    • Searching for the error message, this seems to be coming from the drupal core ManagedFile element not having a content association.
      • It seems that this happens when a file is uploaded for permanent storage but not associated with a particular node or piece of content.
      • I see in modules/contrib/imce/src/ImcdFileField.php (line 137) that the image is getting an association, however in src/Plugin/IMCEPlugin/Upload.php (line 80) it is not getting an association.
      • NOTE: I have no idea if this is the cause, a clue to the cause or a red herring.
Production build 0.71.5 2024