
Hi,
I've a huge problem : Syntax Highlighter didn't detect brush files or available themes (url : admin/config/content/syntaxhighlighter).
See attached screenshoot :
First test :
syntaxhighlighter_3.0.83 is not installed and not unziped.
Syntax highlighter js library is reported as "Installed" (url : admin/reports/status ).
But I didn't unzip it.
Second test :
After I've unziped js library in sites/all/libraries/syntaxhighlighter_3.0.83, admin/reports/status always report that Syntax highlighter js library is "Installed".
I've unziped like that :
sites/all/libraries/syntaxhighlighter_3.0.83/scripts/
sites/all/libraries/syntaxhighlighter_3.0.83/styles/
But admin/config/content/syntaxhighlighter show that :
Problem :
With or without library, actually I can't use Syntax Highlighter. Why ?
Comment | File | Size | Author |
---|---|---|---|
#10 | syntaxhighlightermodulepluploadpatch-1875368-9.patch | 1.23 KB | nothinghere |
#2 | phpinfo no highlight.PNG | 1.17 KB | nothinghere |
syntaxhighlight no lib.PNG | 16.56 KB | nothinghere |
Comments
Comment #1
nothinghere commentedI've edited "syntaxhighlighter.admin.inc".
I've changed :
$path = _syntaxhighlighter_get_lib_location();
to :
$path = '/var/www/public_html/sites/all/libraries/syntaxhighlighter_3.0.83';
Now everything work fine.
Why "_syntaxhighlighter_get_lib_location();" didn't return syntaxhighlighter libraries path ?
Comment #2
nothinghere commentedSecond problem :
Code isn't highlighted !

See this screenshoot :
Below, source code used :
I need to edit "syntaxhighlighter.module" too, and change
$lib_location = _syntaxhighlighter_get_lib_location();
to
$lib_location = '/var/www/public_html/sites/all/libraries/syntaxhighlighter_3.0.83';
Comment #3
fizk commentedInstead of making any code changes, I think you should have renamed
sites/all/libraries/syntaxhighlighter_3.0.83
tosites/all/libraries/syntaxhighlighter
Comment #4
nothinghere commentedI've done what you say.
It doesn't work.
How can I display the result of _syntaxhighlighter_get_lib_location(); in admin/reports/status ? (to help to debug this problem)
Comment #5
fizk commentedYou can try
drupal_set_message(print_r(_syntaxhighlighter_get_lib_location(), true));
Comment #6
nothinghere commentedI've used :
First test : with $path = '/var/www/public_html/sites/all/libraries/syntaxhighlighter'; in syntaxhighlighter.admin.inc and syntaxhighlighter.module
I've edited "syntaxhighlighter.admin.inc" as follow :
Here is what I get on admin/config/content/syntaxhighlighter :

Second test : with $path = _syntaxhighlighter_get_lib_location(); in syntaxhighlighter.admin.inc and syntaxhighlighter.module
I've edited "syntaxhighlighter.admin.inc" as follow :
Here is what I get :
There is no language to activate ! :(
Why I have
sites/all/libraries/plupload/doc
?Syntaxhilighter is not compatible with plupload module ? It doesn't find the right path.
Comment #7
fizk commentedThere's a syntaxhighlighter inside plupload that should be ignored, but there's a typo in syntaxhighlighter.module.
In syntaxhighlighter.module, on line 397, try changing:
foreach (file_scan_directory($d, '/shCore\.js$/', array('nomask' => '/(\.\.?|CVS|src|pupload)$/')) as $filename => $file_info) {
to:
foreach (file_scan_directory($d, '/shCore\.js$/', array('nomask' => '/(\.\.?|CVS|src|plupload)$/')) as $filename => $file_info) {
Comment #8
fizk commentedLooks like others have run into this too: #1589140: scan_lib_location finds shCore.js in plupload docs directory
Comment #9
nothinghere commentedShould be :
foreach (file_scan_directory($d, '/shCore\.js$/', array('nomask' => '/(\.\.?|CVS|src|pupload|plupload)$/')) as $filename => $file_info) {
Comment #10
nothinghere commentedPatch attached.
Here is my first patch for drupal. Hope it works :-)
Comment #11
fizk commentedI've become the co-maintainer of this module, so I'll commit your patch and the other patches related to scanning for the syntax highlighter library.
Marking duplicate of #1589140: scan_lib_location finds shCore.js in plupload docs directory.