Library not findable in new install on 10.0.8

Created on 22 April 2023, over 1 year ago
Updated 12 September 2023, over 1 year ago

Problem/Motivation

After installing on a relatively clean version of Drupal 10.0.8, I get this error:

"FlexSlider library not found. Please consult the README.md for installation instructions."

But I have put in sites/all/libraries/flexslider/.

root@XXX:/var/www/html/XXX/web/sites/all/libraries/flexslider# ls
CONTRIBUTING.md  bower_components  demo                    flexslider.less           jquery.flexslider.js
LICENSE.md       changelog.txt     flexslider-rtl-min.css  fonts                     node_modules
README.md        composer.json     flexslider-rtl.css      images                    package.json
bower.json       css               flexslider.css          jquery.flexslider-min.js

It looks like this is the right path. When I go to this URL, I get plenty of javascript:

https://xxx.com/xxx/web/sites/all/libraries/flexslider/jquery.flexslider...

Any thoughts? TIA.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Flex Slider Library

Created by

πŸ‡ΊπŸ‡ΈUnited States bogdog400

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

Comments & Activities

  • Issue created by @bogdog400
  • πŸ‡ΊπŸ‡ΈUnited States bogdog400

    I moved the directory to sites/default/libraries/ from sites/all/libraries and it's now findable. Must be something in the libraries configuration.

    This looks fixed to me.

  • πŸ‡ΊπŸ‡ΈUnited States bogdog400

    Here's a slightly different problem. I'm seeing this error that seems to come from the code looking for the library inside of the module itself.

    Warning: file_get_contents(modules/contrib/flexslider/dist/js/flexslider.load..min.js): Failed to open stream: No such file or directory in Drupal\Core\Asset\JsCollectionOptimizer->optimize() (line 123 of core/lib/Drupal/Core/Asset/JsCollectionOptimizer.php).
    Drupal\Core\Asset\JsCollectionOptimizer->optimize(Array) (Line: 282)
    Drupal\Core\Asset\AssetResolver->getJsAssets(Object, 1) (Line: 318)
    Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries(Object, Array) (Line: 157)
    Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments(Object) (Line: 94)
    Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor->processAttachments(Object) (Line: 45)
    Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond(Object, 'kernel.response', Object)
    call_user_func(Array, Object, 'kernel.response', Object) (Line: 111)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.response') (Line: 196)
    Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 184)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 686)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    
  • πŸ‡³πŸ‡±Netherlands sebastian hagens Breda, Netherlands

    This module is not compatible with Drupal 10 out-of-the-box as it's using jQuery as a dependency. jQuery has been removed from Drupal 10.

  • πŸ‡¬πŸ‡§United Kingdom robbm

    While the dev version suggests it is compatible with D10 (i.e. https://www.drupal.org/project/flexslider/releases/8.x-2.x-dev β†’ ), there may still be issues to address (i.e. https://www.drupal.org/project/flexslider/issues/3297249 πŸ“Œ Automated Drupal 10 compatibility fixes Fixed ).

    Nevertheless, having encountered a similar issue in Drupal 9, it seems that there may be an erroneous period in flexslider.libraries.yml - i.e. it references flexslider.load..min.js rather than flexslider.load.min.js. The attached patch should remove that period, so that the library is found.

  • Status changed to Needs review over 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom robbm
  • πŸ‡¬πŸ‡§United Kingdom robbm

    Actually, the above fix is included in https://www.drupal.org/project/flexslider/issues/3297249#comment-15137802 πŸ“Œ Automated Drupal 10 compatibility fixes Fixed . So you're probably better off using that…

  • πŸ‡¨πŸ‡¦Canada minoroffense Ottawa, Canada

    I created a 3.x branch for the D10 support and dropping D8. I haven't tested it yet but I'm working on a site that uses Flexslider that's being upgraded. Once I know it works I'll put a release in.

  • Status changed to Fixed over 1 year ago
  • πŸ‡¨πŸ‡¦Canada minoroffense Ottawa, Canada

    Going to mark this as fixed since the 3.x branch has an alpha. Feel free to reopen if you still have issues.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024