Error on publish an unpublished node.
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3539185. -->
Reported by: [gromani14](https://www.drupal.org/user/1841298)
Related to !13
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When a previous unpublished node is re-published got an error</p>
<p>TypeError: Drupal\file_visibility\FileVisibility::hasPublicScheme(): Argument #1 ($uri) must be of type string, null given, called in /var/www/html/web/modules/contrib/file_visibility/src/FileVisibility.php on line 217 in Drupal\file_visibility\FileVisibility->hasPublicScheme() (line 202 of modules/contrib/file_visibility/src/FileVisibility.php).</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Unpublish a node (files will be moved to private)<br>
Publish again, it fails.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Looks like a null value is passed on Drupal\file_visibility\FileVisibility->hasPublicScheme() live 217, just replacing that by an empty string looks like is working.</p>
issue