Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Assets should now be defined using *.libraries.yml, see - https://www.drupal.org/developing/api/8/assets
Comment | File | Size | Author |
---|---|---|---|
#4 | define_library_using_flexslider.libraries.yml-2769355-4.patch | 879 bytes | Ramdas Gaikar |
#3 | ss+(2016-09-28+at+12.29.22).png | 7.22 KB | Chroid |
Comments
Comment #2
amaria CreditAttribution: amaria commentedYes, but this is using the libraries module. Which I admit has probably changed somewhat since this was completed. I'll look into again when I get some time.
Comment #3
Chroid CreditAttribution: Chroid at Sparks Interactive commentedAgreed. If the D8 library include method is used, the call to
libraries_get_path('flexslider');
in theflexslider_library_info_build()
returns false, and you end up with the site trying to load assets from, for example - http://flexslider.css which obviously fails.Comment #4
Ramdas Gaikar CreditAttribution: Ramdas Gaikar at Intelliswift commentedHello,
Attaching patch for this, But I think there also we need to do some changes in install file.
Thanks.
Comment #5
Sonal.Sangale CreditAttribution: Sonal.Sangale at Blisstering Solutions, Iksula commentedChanging the status of issue to review added patch.
Comment #6
amaria CreditAttribution: amaria commentedThe attached patch will not work since we are using Libraries API to load the FlexSlider assets. Also, it appears to be using the js directly from github as opposed to from a local directory. I am currently looking into removing the dependency on the Libraries API altogether since it still only has a dev release and may be changing drastically in the near future.
Comment #8
amaria CreditAttribution: amaria commentedI decided to use a hybrid approach which uses both the libraries yml and Libraries API module. I imagine this will change somewhat once Libraries API is more stable.