- Issue created by @aiphes
- πͺπΈSpain jmohino
Hi aiphes, I have the same problem, after this warning do you have other like:
Deprecated function: dirname(): Passing null to parameter #1 ($path) of type string is deprecated en Drupal\Core\Extension\ExtensionPathResolver->getPath() (lΓnea 85 de /var/www/html/mysite/web/core/lib/Drupal/Core/Extension/ExtensionPathResolver.php)
- π¦π²Armenia le72 Yerevan π¦π²
Hi,
I have both warnings.
Drupal 9.5.1
Focal Point 2.0.0-alpha2 - π«π·France aiphes
Hi
@jmohino I've not noticed this, but I get some 500 errors in addition when authentified. But not related I think. - πͺπΈSpain jmohino
I think it may be related to this issue Deprecated function: dirname(): Passing null to parameter #1 ($path) of type string is deprecated π Deprecated function: dirname(): Passing null to parameter #1 ($path) of type string is deprecated Postponed: needs info
- π«π·France aiphes
Maybe, but no fix for the moment as I can read.
- πͺπΈSpain jmohino
Yes, This means that lines 58 and 85 of the ExtensionPathResolver.php file would have to be changed to make the php notices disappear:
58
- return $this->extensionLists[$type]->getPathname($name); + return $this->extensionLists[$type]->getPathname($name ?? '');
85
- return dirname($this->getPathname($type, $name)); + return dirname($this->getPathname($type, $name) ?? '');
- π«π·France aiphes
So, we need to wait for an update of the core ? I just start to update to 9.5.3 my websites and the error is still here:
User warning: The following theme is missing from the file system: jquery_ui_draggable in Drupal\Core\Extension\ExtensionPathResolver->getPathname() (line 63 of core/lib/Drupal/Core/Extension/ExtensionPathResolver.php).
- πͺπΈSpain jmohino
Today I noticed that the jquery_ui_draggable library had been installed as a dependency when updating focal_point, but it had not been enabled,
I realized when I entered extend and saw that it was not active. Maybe that's where the problems came from, my fault!!
- πͺπΈSpain jmohino
Go into your site /admin/modules and check that "jQuery UI Draggable" is enabled, if not, enable it. You can also do it with drush from the CLI with "vendor/bin/drush pm:enable jquery_ui_draggable".
If it was already activated, the only way to remove the notices is by changing the 2 lines of comment #9, for now.
- π«π·France aiphes
OK, I enabled the module:
jQuery UI jQuery UI Draggable (jquery_ui_draggable) Disabled 8.x-1.5 ----------- ------------------------------------------- ---------- --------- $ drush @sited9pf en -y jquery_ui_draggable > [success] Successfully enabled: jquery_ui_draggable $ drush @sited9pf pml --filter=drag ----------- ------------------------------------------- ---------- --------- Package Name Status Version ----------- ------------------------------------------- ---------- --------- jQuery UI jQuery UI Draggable (jquery_ui_draggable) Enabled 8.x-1.5
Will see if warning disappear. Finger cross. ;)
- π³π±Netherlands Summit
Hi, would it be possible to make this as a patch, the 2 lines from https://www.drupal.org/project/jquery_ui_draggable/issues/3337831#commen... π¬ The following theme is missing from the file system: jquery_ui_draggable Active ?
After updating to Drupal 10.3.0 I got the same error.
Thanks and greetings, - First commit to issue fork.
Hello,
here is the patch for the 2 linesdiff --git a/core/lib/Drupal/Core/Extension/ExtensionPathResolver.php b/core/lib/Drupal/Core/Extension/ExtensionPathResolver.php index 5045949a..613d87e0 100644 --- a/core/lib/Drupal/Core/Extension/ExtensionPathResolver.php +++ b/core/lib/Drupal/Core/Extension/ExtensionPathResolver.php @@ -55,7 +55,7 @@ class ExtensionPathResolver { throw new UnknownExtensionTypeException(sprintf('Extension type %s is unknown.', $type)); } try { - return $this->extensionLists[$type]->getPathname($name); + return $this->extensionLists[$type]->getPathname($name ?? ''); } catch (UnknownExtensionException $e) { // Catch the exception. This will result in triggering an error. @@ -82,7 +82,7 @@ class ExtensionPathResolver { * If the extension is unknown. */ public function getPath(string $type, string $name): string { - return dirname($this->getPathname($type, $name)); + return dirname($this->getPathname($type, $name) ?? ''); } }
It solved for me the issue with the dirname() warning message
- π³π±Netherlands Summit
Hi, great you made the patch, could you attach it, so I can link to it within my composer.json file?
thanks in advance!
greetings, - Status changed to Closed: works as designed
5 days ago 9:13am 11 November 2024 - π©πͺGermany Hydra
The hint in #11 helped me, thx. Since this is clearly the cause of the originally described error message, we should close this.