Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drupal 8 issue: InvalidArgumentException: The URI '' is invalid

I am struggling with this issue:

InvalidArgumentException: The URI '' is invalid.
You must use a valid URI scheme. in Drupal\Core\Url::fromUri() 
(line 284 of core/lib/Drupal/Core/Url.php).

How can I fix this?

like image 614
Pupil Avatar asked Oct 28 '25 17:10

Pupil


1 Answers

You are passing a blank uri into the method. It is complaining about missing a scheme (eg. http:// or https://, or an internal scheme eg: internal:/)

So either you are explicitly passing a blank, or something isn't being set correctly. However, it does not seem to be null.

like image 102
twill Avatar answered Oct 31 '25 10:10

twill