Skip to content

[5.x]: Asset browser modal showing multiple checkboxes instead of single checkbox #18863

@yogesh3694

Description

@yogesh3694

What happened?

Craft CMS version: 5.9.22

PHP version: 8.4
Server: Apache/2.4.67 (Ubuntu)
What happened:
Inside the asset browser modal (opened from an entry's Image/Assets field), the checkbox row is displaying multiple checkboxes when only a single checkbox should be shown. This appears to be a UI rendering/display bug in the modal's selection controls.
Steps to reproduce:

Open any entry in the Craft admin (e.g. a General Page entry)
Click + Add on an Image or Assets field to open the asset browser modal
Navigate into any subfolder (e.g. Marketing-Images > 2025 > MS)
Observe the checkbox row at the top of the file listing

Expected behaviour:
A single "Select all" checkbox should appear at the top of the asset list inside the modal.
Actual behaviour:
Multiple checkboxes are rendered/displayed in the checkbox row (visible as a row of repeated checkbox elements highlighted in yellow in the screenshot). Only one should be present.
Screenshot:
(Attach Image 2 — the modal screenshot showing the repeated checkboxes highlighted in yellow)
Additional context:

This is a display/UI issue only, isolated to the asset browser modal
The main Assets section in the admin does not appear to have this issue
A related 400 Bad Request error also occurs on admin/actions/element-indexes/get-elements when interacting with these checkboxes (may or may not be related)
Browser tested: Chrome
Server: Apache/2.4.67 (Ubuntu)

Possible cause:
A JavaScript component may be initialising the checkbox element multiple times, or a template partial is being rendered more than once inside the modal context.

Image Image

Craft CMS version

5.9.22

PHP version

8.4.11

Operating system and version

Linux 6.17.0-1013-aws

Database type and version

MySQL 8.0.44

Image driver and version

GD 8.4.11

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    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