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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fizk’s picture

Title: _syntaxhighlighter_get_lib_location is not robust when other lbraries have similar filder structures » _syntaxhighlighter_get_lib_location is not robust when other libraries have similar directory structures
fizk’s picture

Issue tags: +Libraries

Adding Libraries tag.

fizk’s picture

Issue summary: View changes

added more details

Vacilando’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Issue summary: View changes

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

fizk’s picture

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

Vacilando’s picture

I agree the requirement would be fine. It's what other modules that need libraries also require.

ttkaminski’s picture

Status: Active » Needs review
FileSize
5.12 KB

Here'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.

  • fizk committed 760679a on 7.x-2.x
    Add an update script for issue #1965178
    
  • fizk committed b671104 on 7.x-2.x authored by ttkaminski
    Issue #1965178 by ttkaminski: _syntaxhighlighter_get_lib_location is not...
fizk’s picture

Status: Needs review » Fixed

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

Status: Fixed » Closed (fixed)

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