Linking image to file/content doesn't work

Created on 7 October 2024, about 2 months ago

When linking the image to the file, I get this message:

LogicException: Bubbling failed. in Drupal\Core\Render\Renderer->executeInRenderContext() (line 583 of core/lib/Drupal/Core/Render/Renderer.php).

In the watchdog I see:

Drupal\tiny_slider\Plugin\Field\FieldFormatter\TinySliderFieldFormatter::getEntityFileUrl(): Return value must be of type ?Drupal\Core\Url, string returned - /var/www/html/web/modules/contrib/tiny_slider/src/Plugin/Field/FieldFormatter/TinySliderFieldFormatter.php:775

And indeed, the getEntityFileUrl() method is supposed to return an URL-Object, but the methods it calls return strings.
Changing the return type from ?Url to ?string seems to fix the issue here.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇩🇪Germany SerkanB

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

Comments & Activities

Production build 0.71.5 2024