Column icons on grid dialog do not respect site base path

Created on 10 May 2025, 22 days ago

Problem/Motivation

The src paths for the column icons on the grid dialog don't include the site's base path, causing them to 404 if the site is not installed at "/". For example, if the site is installed at www.foo.com/bar and uswds_editor_integration is installed via composer, the grid dialog attempts to load www.foo.com/modules/contrib/uswds_editor_integration/images/ui/col_X.png (missing the /bar/ component of the path).

Steps to reproduce

  1. Install a Drupal site with a base path longer than "/"
  2. Install uswds_ckeditor_integration with composer
  3. Add a USWDS Grid component to a CKEditor field and examine the grid configuration dialog

Proposed resolution

Add the site's base path to the beginning of the src attribute of the icons.

Remaining tasks

  1. Figure out how to obtain the site's base path...
  2. Add it to $img in buildSelectStep() of src/Form/GridDialog.php.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

3.1

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024