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.
I was creating a new module when I realized that I couldn't import jquery.hotkeys due to an issue with i10n_client which has already load a jquery.hotkeys.js
Shoudn't we place jquery.hotkeys in the libraries directory?
Comments
Comment #1
droplet CreditAttribution: droplet commentedDrupal able to load another JS replace the exist one. No conflict at all.
Comment #2
SebCorbin CreditAttribution: SebCorbin commentedWe need to use libraries module as a non-required dependency.
In the following order:
Verify if function
libraries_load()
exists and try to loadjquery.hotkeys.js
Try to load
jquery.hotkeys.js
within sites/all/librariesLoad our own
jquery.hotkeys.js
as fallbackThe problem won't be solved if other modules are not loading this library from sites/all/libraries though.