Drupal 11 compatibility and rendering fixes for THRON module

Created on 2 July 2025, 3 months ago

Problem/Motivation

The THRON module is currently not compatible with Drupal 11. When attempting to use it in a modern Drupal installation, several issues arise:

- Composer constraints do not allow installation with `drupal/core:^11`.
- Adding a THRON Media field to a content type using "HTML tag" or "Thron Player" formatters causes rendering errors.
- Media thumbnails do not display correctly under `/admin/content/media`.
- Image cropping does not function as expected when uploading a media item via the entity browser.
- The CKEditor button for THRON appears with a generic "E" icon instead of the correct THRON logo.

These issues significantly limit the usability of the module in current Drupal setups and hinder integration with other media workflows.

Steps to reproduce

1. Install the `drupal/thron` module on a Drupal 11 site.
2. Try adding a THRON Media field to a content type.
3. Attempt to render the media field using the "HTML tag" or "Thron Player" formatters.
4. Use the CKEditor THRON button β€” observe the missing icon.
5. Go to `/admin/content/media` β€” thumbnails for THRON media are not shown.
6. Upload a THRON media item via the entity browser and attempt to crop an image.

Proposed resolution

A patch has been created that:

- Updates module info and constraints to support Drupal 11.
- Fixes rendering errors in the HTML Tag and Thron Player formatters when used with entity reference fields pointing to THRON media.
- Restores the proper display of thumbnails for THRON media entities in `/admin/content/media`.
- Resolves image crop issues when uploading THRON media via the entity browser.
- Corrects the CKEditor button icon to show the appropriate THRON logo.

All changes are backward-compatible with Drupal 10.x, and the patch has been tested in real Drupal 11 environments.

Remaining tasks

- Review the patch for coding standards.
- Test the patch on clean Drupal 10 and 11 installations.
- Confirm compatibility with CKEditor 5 if relevant.
- Obtain feedback from maintainers and users.

User interface changes

- Correct THRON logo now displays on the CKEditor button.
- Thumbnails for THRON media are visible on the media overview page.
- No regressions or new elements introduced to existing UIs.

API changes

None.

Data model changes

None.

Installation notes

Due to strict version constraints in the module and its dependencies, it is currently necessary to use `composer-drupal-lenient` to allow installation on Drupal 11. Until the module’s `info.yml` and `composer.json` are updated upstream, use the following commands:

composer require mglaman/composer-drupal-lenient

composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/thron"]'
composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/media_entity_browser"]'
composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/ckeditor"]'
composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/media_entity_browser_media_library"]'

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024