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 installed the flexslider library which co-incidently had a folder /scripts with 3 brush scripts css xml and js. The syntax highlighter library detection function shifted to this library rather than the library folder called syntaxhighlighter. I had to remove the flexslider library completely for the syntaxhighlighter library to be picked up.
I think you need to define a specific folder for the library called syntaxhighlighter in the detection function and specify that the library be placed inside this folder in the README.txt
Comment | File | Size | Author |
---|---|---|---|
#6 | syntaxhighlighter-libscan-1965178-6.patch | 5.12 KB | ttkaminski |
Comments
Comment #1
fizk CreditAttribution: fizk commentedComment #2
fizk CreditAttribution: fizk commentedAdding Libraries tag.
Comment #2.0
fizk CreditAttribution: fizk commentedadded more details
Comment #3
Vacilando CreditAttribution: Vacilando commentedI entered dpm(_syntaxhighlighter_get_lib_location()); in syntaxhighlighter.admin.inc and got the following path:
sites/all/libraries/flexslider
This issue is similar to the one about plupload — see #1589140: scan_lib_location finds shCore.js in plupload docs directory.
(Tempted to increase priority of this issue as it may be causing the module not to function in many other similar cases.)
Comment #4
fizk CreditAttribution: fizk commentedI think it's fair if we require users to rename the folder to "syntaxhighlighter" because other modules do the same. We'll definitely be breaking some websites, though.
Comment #5
Vacilando CreditAttribution: Vacilando commentedI agree the requirement would be fine. It's what other modules that need libraries also require.
Comment #6
ttkaminski CreditAttribution: ttkaminski commentedHere's a patch that forces the library to be installed into a directory named "syntaxhighlighter". This allows the libraries module to be optionally used to do the path resolution.
I've removed support for scanning the "files" directory as this shouldn't have been supported in the first place. Not only was this not standard practice, but in my case, the files directory contains hundreds of thousands of files mounted over NFS and it was taking minutes to complete the scan. For a multisite install, if the admin wants per site version of syntaxhighlighter, then use the libraries module and place in
/sites/<site>/libraries
This patch should resolve several open issues previously reported.
Comment #8
fizk CreditAttribution: fizk commentedThanks Vacilando, ttkaminski. Funny how time flies by. I've committed #6 and added an update script to warn users if the syntaxhighlighter library could not be found. This is in addition to the error message they would see on the status page.