Skip to content

File Usage not incrementing when using multiple images in a textarea field with file:xx:url #4720

Description

@nep

Description of the problem
The file usage function is buggy. When you're using a textarea field in an entry to contain text and images, EE only counts the first image when you save or resave the entry. It does pick it up if you reindex the whole site.

How To Reproduce

  1. Upload several images, or simply add the image code for several images, to a text area field.
  <img src="{file:15149:url}" />
  <img src="{file:15150:url}" />
  <img src="{file:15151:url}" />
  1. Save the entry.
  2. Look to see if the image count has incremented for all three images. It hasn't.

Error Messages
No error messages.

Screenshots / Videos / Template Code

BEFORE: 0, 0, 0
Image

ADDING THREE IMAGES TO A TEXT AREA
Image

AFTER: 1, 0, 0 -- ONLY ONE IS INCREMENTED
Image

Environment Details:

  • Version: 7.5.7
  • PHP Version 8.3.6
  • MySQL Version ?
  • OS: Linux
  • Web Server: Apache

Possible Solution
No idea.

Additional context
I consider this a fairly serious bug, because it does make people think they can delete a file that has no usage, when that file may be in active use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions