Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299493

TypeError: Argument 1 passed to Drupal\Core\File\FileUrlGenerator::generateString() must be of the type string, null given

$
0
0

Problem/Motivation

I have updated my site completely to the newest 9.3 version. In this I have a node with paragraphs as my theme homepage. And theme homepage gives WSOD with the following error on latest 9.3:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\Core\File\FileUrlGenerator::generateString() must be of the type string, null given, called in httpdocs/web/sites/default/files/php/twig/61b7c1cc12197_paragraph--view_referance_kTM91Di4YhANCpjtiZ2FlHIET/OWkkQEG98F61u897Zzc3agnP4Cd1gZmHLd6BGlNRCH0.php on line 41 in Drupal\Core\File\FileUrlGenerator->generateString() (line 58 of core/lib/Drupal/Core/File/FileUrlGenerator.php).

After some research I removed all paragraphs from the node, and then the WSOD and error is gone.

Steps to reproduce

When I add one custom-html paragraph with just the word 'test' the WSOD and error is back again.

Proposed resolution

I tried adding this https://www.drupal.org/files/issues/2020-01-06/added_empty_check_on_uri-...
to to /lib/Drupal/Core/File/FileUrlGenerator.php but error still stays.

Proposed solution, take care that Argument 1 is not null.

Remaining tasks

User interface changes

API changes

Data model changes

Greetings and thanks in advance for looking into this,
Martijn


Viewing all articles
Browse latest Browse all 299493

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>