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.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

serkanb created an issue. See original summary.

serkanb’s picture

Status: Active » Needs review

ipwa made their first commit to this issue’s fork.

  • ipwa committed ccd545c4 on 1.1.x
    fix: #3479131 Linking image to file/content doesn't work
    
    By: serkanb
    By...
ipwa’s picture

Thanks for your contribution @serkanb!

ipwa’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.