The following theme is missing from the file system: jquery_ui_draggable

Created on 31 January 2023, almost 2 years ago

Hello,

After updating the focal point module, I get this warning:

 composer2 require 'drupal/focal_point:^2.0@alpha'
Package operations: 1 install, 1 update, 0 removals
  - Installing drupal/jquery_ui_draggable (1.5.0): Extracting archive
  - Upgrading drupal/focal_point (1.5.0 => 2.0.0-alpha2): Extracting archive

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).

On D9.5.2 + PHP 8.1.6
What can I do to fix this ?

Thanks

πŸ’¬ Support request
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡«πŸ‡·France aiphes

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @aiphes
  • πŸ‡«πŸ‡·France aiphes

    Admin theme : Claro

  • πŸ‡ͺπŸ‡Έ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!!

  • πŸ‡«πŸ‡·France aiphes

    @jmohino So what do we need to do ?

  • πŸ‡ͺπŸ‡Έ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 lines

    diff --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
  • πŸ‡©πŸ‡ͺ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.

Production build 0.71.5 2024