Fixed
Project:
File Entity (fieldable files)
Version:
8.x-2.7
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jul 2026 at 17:17 UTC
Updated:
31 Jul 2026 at 08:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #5
gurkawal commentedHi @n.dhuygelaere
I was able to reproduce this after updating from Drupal 11.3 to Drupal 11.4.0
The issue happens because FileImageResponsiveFormatter extends core’s ImageFormatter, but it redeclares inherited properties without the same types now used by core in Drupal 11.4.
I created an MR to fix the compatibility issue
After applying the change, the fatal error is resolved.
Comment #6
n.dhuygelaere commentedHi thanks,
based on your merge request i have created the attached patch. It works for D11.4.0 and drupal/file_entity:2.4 but it makes a fatal error on D11.3.13
Comment #7
joseph.olstadhave you tried 8.x-2.5-rc2 ???
Comment #8
joseph.olstadI just tagged 8.x-2.5
please test against 11.4
Comment #9
joseph.olstadComment #10
radinex commentedThe current patch created for the dev branch do not apply cleanly to the stable 8.x-2.5 (2.5.0) release of file_entity due to line number and whitespace context differences.
Furthermore, when updating to Drupal Core 11.4.0, because the stable 2.5.0 code is missing the use statements for AccountInterface and EntityStorageInterface at the top of the file, applying the dev patch directly results in a PHP compilation error: Fatal error: Class "Drupal\file_entity\Plugin\Field\FieldFormatter\AccountInterface" not found
To fix this on Drupal 11.4.0 with the stable file_entity 2.5.0 release, I have created a patch that uses the fully qualified class names (\Drupal\Core\Session\AccountInterface and \Drupal\Core\Entity\EntityStorageInterface). This allows the patch to apply cleanly to the stable release and resolves the PHP fatal error immediately without requiring additional class imports.
I have attached the patch below: file_entity-3607726-typehint-2.5.0.patch.
Comment #11
vvs commented#10 is good for 2.6 and 11.4.2
Comment #12
joseph.olstadpreviously this change was causing test failures
Comment #13
jaydarnellChanges from merge request #33 apply cleanly to file_entity 2.6 and appear to work with Drupal core 11.4.4.
Comment #14
joseph.olstadCan't merge this, it breaks phpunit testing, many fails.
Comment #15
uqjhawk3 commentedAlso confirm MR#33 working against 11.4.4 & file_entity 2.6
Comment #16
joseph.olstadsure is a lot of test failures for D11.4.x
Comment #17
joseph.olstadComment #19
joseph.olstadComment #21
joseph.olstadFIXED!
I had to also adjust the automated test due to an admin page in core moving around.
Thanks!
https://www.drupal.org/project/file_entity/releases/8.x-2.7
Everyone above has been creditted with the fix.
Comment #22
websiteworkspace commentedIs the following fatal error during {site}/update.php the same error that the patch above portends to repair?
Had to set the composer.json file to version 2.6.0 to prevent module upgrade until these problems get repaired.
Comment #23
uqjhawk3 commentedThe above error also occurred for me on a 11.3.16 site. So perhaps this works with 11.4.x but breaks 11.3.x?
Comment #24
joseph.olstadThanks for the feedback, working on it.
Comment #25
joseph.olstadhmm, looking to see if there's a better solution.
Comment #27
joseph.olstadOk 2.8 should do the job.
Sorry for the inconvenience and I thank you for the quick reporting.
https://www.drupal.org/project/file_entity/releases/8.x-2.8
Comment #28
websiteworkspace commentedWow! Thank you for quickly pushing out a hot fix release.
-
Both the composer.json updating and the {site}/update.php runs were clean and in the green.
-
I then checked node bundles that use file entities and all seem good that i had time to check.
-
This hot fix release should hopefully reduce the number of problems that currently block upgrades to 11.4.x drupal core.