I've installed the GeSHi filter module on my Drupal 7 site, and am having issues with getting it to detect the presence of the GeSHi library. To rule out my own idiocy, the steps I've taken are;
- Downloaded GeSHi 7.x-1.0-alpha2
- Downloaded Libraries API 7.x-2.x-dev
- Downloaded newest version of 1.0.x branch of GeSHi library (1.0.8.10)
- Copied modules to /sites/all/modules/...
- Copied GeSHi library folder to /sites/all/modules/geshifilter/...
- Installed modules etc
But no dice - the README.txt states that;
The general GeSHi Filter settings can be found by navigating to:
administer > site configuration > geshifilter.
Set the path to the GeSHi library on that page, if it is not detected automatically already.
However, I don't get any option to manually set the path, just an error message telling me that the library was not detected.
I've double-checked my install and re-installed, so any tips would be appreciated.
Comment | File | Size | Author |
---|---|---|---|
#8 | show_libraries-7.x-1_0_API.JPG | 31.24 KB | homer777 |
#7 | geshiFilterIssue.JPG | 39.28 KB | homer777 |
#7 | geshiFilterIssue2.JPG | 21.18 KB | homer777 |
Comments
Comment #1
calmer1982 CreditAttribution: calmer1982 commentedI am having the same problem, I do not have the option to set the manual path for the GeSHi library. I was using Windows 2003 server, could this be the problem? or is it just a bug with drupal 7?
It must be part working as it is changing to [geshifilter-blockcode language="Javascript"]
I am trying to find out what the function libraries_load('geshi'); is trying to do and I will see if you can change the function to enter the location of the GeSHi library.
I will let you know how it goes.
Comment #2
calmer1982 CreditAttribution: calmer1982 commentedOK, I have a every rushed and extreme fix, but it has worked :)
First:
add the line
include_once('geshi/geshi.php');
to the top of every *.inc and *.module files in the root of geshifilter folder
Then you need to replace in all files in the root of geshifilter folder the following:
Replace All: (!$geshi_library['loaded'])
With: (/*!$geshi_library['loaded']*/0)
And
All Replace: ($geshi_library['loaded'])
With: (/*$geshi_library['loaded']*/1)
You can see it working at http://www.martinjamesholland.co.uk/?q=node/14
But there must be a better fix then this :)
Comment #3
calmer1982 CreditAttribution: calmer1982 commentedYou also need to change the following line in include the languages:
$geshi_library['library path'].'/geshi'
to
drupal_get_path('module', 'geshifilter') . '/geshi' .'/geshi'
in the file geshifilter.inc
Once all has change are made, you may need to un-install the filter then apply it again.
Comment #4
boombatower CreditAttribution: boombatower commentedYou can configure libraries module to look where ever you want, but it defaults to libraries directory within a site. For example sites/all/libraries or sites/default/libraries. Which is nice since it lets you keep the integration code and library in separate locations.
So geshifilter would be .../libraries/geshifilter. See if that works.
Comment #5
homer777 CreditAttribution: homer777 commentedI have the exactly same issue. Frustrated.
Comment #6
boombatower CreditAttribution: boombatower commentedDid you place it in sites/all/libraries/geshifilter or any other sites/.../ as suggested in #4?
Comment #7
homer777 CreditAttribution: homer777 commentedYes, as the attached pictures show.
Comment #8
homer777 CreditAttribution: homer777 commentedlibraries-7.x-1.0.zip is also extracted in /public_html/sites/all/libraries, as shown in the attached picture.
Comment #9
boombatower CreditAttribution: boombatower commentedlibraries 2.x as the project page notes...
Comment #10
homer777 CreditAttribution: homer777 commentedcalmer1982, your fix does not work in my case. I do not know why.
Comment #11
openWeb CreditAttribution: openWeb commentedThis issue seems to exist only if the latests stable geshi-version is used. Had this to and after downgrading geshi to version 1.0.2 everything works as expected...
Seems to be some API-changes (or a global?) in the geshi-code.
Comment #12
boombatower CreditAttribution: boombatower commentedThis module doesn't support the 1.1.x line of geshifilter as noted on project page.
Comment #13
openWeb CreditAttribution: openWeb commentedThe issue was raised with geshi version 1.0.8.10... So no 1.1.dev used here.
I tried most versions on geshi-site (versions <1.0.2 don't have the GESHI_VERSION-global and therefor fail from beginning...)
Comment #14
aliech CreditAttribution: aliech commentedHi all!
I have some problem, it's seems like bug in cache method of Libraries API module. After cleaning cache all works fine.
Comment #15
homer777 CreditAttribution: homer777 commentedNobody has tried to solve it yet? Can anyone provide info for an module to provide similar functionalities of GeSHi? Thanks!
Comment #16
boombatower CreditAttribution: boombatower commentedHuh? It works fine if you use the appropriate version of the geshi library either using the drush make script or instructions on project page.
Comment #17
boombatower CreditAttribution: boombatower commentedIs this still an outstanding issue?
Comment #18
openWeb CreditAttribution: openWeb commentedI think we could close this one... Seems to be a caching issue indeed. After cleaning the cache more then 2 times, this issue seems to be gone.
Comment #19
brianhogg CreditAttribution: brianhogg commentedI'm having the same issue, in that no matter where the Geshi folder was located Geshi Filter module could not detect it (v1.8.10 initially then v1.0.2, which perhaps explains the problem). I cleared all the caches multiple times from Administration > Configuration > Performance, along with visiting Administration > Reports > Status Report (which apparently forces a rescan of the library locations). I ended up using the Syntax Highlighter module instead which worked first time with the relevant library in sites/all/libraries:
http://zugec.com/70-how-use-syntax-highlighter-module-drupal-7
I'm new to Drupal so if there is another cache location or something else I'm missing would be great to know, otherwise Syntax Highlighter is a nice alternative. Thanks!
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedSubscribing, problem for me too on 7.x-1.0 and libraries 2.x-dev. (used version of the library from the makefile too). 2x `drush cc all` fixed it..
Changing status too since I don't see any patch to review. Might not be the module's fault but a Drupal 7 bug though?
Comment #21
boombatower CreditAttribution: boombatower commented"drush cc all" fixed it, yes clearing cache is necessary for many parts of Drupal and is also used by the Libraries project. This isn't a bug....
Comment #22
openWeb CreditAttribution: openWeb commentedat least it's not a bug in the geshi-module... the cache in d7 really is somewhat strange. no matter if you develop or simply use modules/themes/templates: most time you have to clear the cache more than once. best thing is to use the "drush cc all"...
Comment #23
homer777 CreditAttribution: homer777 commentedI am still having the same issue with GeSHi Filter. It is NOT because I did not get the correct versions. I followed the instructions. I have many year IT experience, even though I am not good at PHP. So trust me.
Yes, Syntax Highlighter is great. It works for me the first time. Many thanks to brianhogg: http://zugec.com/70-how-use-syntax-highlighter-module-drupal-7
Comment #24
boombatower CreditAttribution: boombatower commentedIs everyone sure they are clearing the cache? If you put the geshi library there before enabling the module or hitting any drupal pages that may remove the need to clear cache since it will do so on install.
Comment #25
kenjiru CreditAttribution: kenjiru commentedI have the same problem.
Comment #26
xoran99 CreditAttribution: xoran99 commentedIndeed, I had the same problem. Clearing all caches fixes the problem (Administer > Configuration > Performance > Clear All Caches), but this is not an obvious step. I suppose this would actually be trouble with the Libraries module, since Libraries keeps a cache but this module does not, to my knowledge...
Comment #27
boombatower CreditAttribution: boombatower commentedThe libraries module does indeed cache that information. Another options is to make sure that you install the library before enabling the module...since it is a dependency.
Comment #29
stieglitz CreditAttribution: stieglitz commentedI was having the same problem and realized I had extracted the tar to the wrong folder. Correcting it to libraries/geshi/geshi.php solved the problem. Correction: I was wrong. Still getting this error: function libraries_load() in sites/all/modules/geshifilter/geshifilter.module on line 231 Using geshi-1.0.8.10
Comment #30
boombatower CreditAttribution: boombatower commentedlibraries_load() is undefined? if so please use libraries 2.x-dev as the project page indicates.
Comment #31
goivvy CreditAttribution: goivvy commentedfrom libraries_get_libraries() you can see that libraries module search following directories:
drupal_root/libraries
drupal_root/sites/all/libraries
and others
place geshi folder into drupal_root/libraries and everything would be ok
Comment #32
boombatower CreditAttribution: boombatower commentedsites/all/libraries
sites/[some_site]/libraries
are definitely preferred
Comment #33
jallenb CreditAttribution: jallenb commentedI had the very issue as described in the original description. The issue is with the Libraries module, not GeSHi Filter.
Drupal 7.9
Libraries (libraries) Module Enabled 7.x-2.0-alpha1
GeSHi Filter (geshifilter) Module Enabled 7.x-1.0
After trying different paths and clearing the cache with 'drush cc all', I found the Libraries module could only locate the GeSHi library after placing it in sites/default/libraries/geshi. It didn't appear to be looking in sites/all/libraries at all.
I'm happy to see it working.
Comment #34
danoprey CreditAttribution: danoprey commentedConfirming it worked for me after a few clears of the cache (through the UI):
sites/all/modules:
geshifilter-7.x-1.x-dev.tar.gz
libraries-7.x-2.0-alpha2.tar.gz
sites/default/libraries:
GeSHi-1.0.8.10.tar.gz
un-tared, obviously.
Comment #35
Keyser Soze CreditAttribution: Keyser Soze commentedIt worked as soon as I installed the Libraries API.
It is mentioned in the geshifilter modules page, stupid of me to have missed that. I did everything mentioned earlier in this page, and when none of those worked, I started reading the module description like a good boy.... :)
Hope this helps some people...
Comment #36
John Bickar CreditAttribution: John Bickar commentedWhen following the instructions in README.txt, I am unable to get the GeSHi Filter module to detect the geshi library when it is placed in the module directory. (I do not have write access to the libraries directory on this particular Drupal install.)
geshifilter-7.x-1.1
libraries-7.x-2.0-alpha2
geshi library is installed in sites/default/modules/contrib/geshi/ like so:
I get the error message "The GeSHi filter requires the GeSHi library (which needs to be downloaded and installed seperately)" at admin/config/content/formats/geshifilter even after clearing the cache several times.
I have confirmed on a separate install that installing the geshi library within sites/all/libraries (e.g.) works, so is it possible that the option to install the library within the module directory has been removed?
Comment #37
soxofaan CreditAttribution: soxofaan commentedindeed, it was removed by:
I updated the installations instructions in the README accordingly (commit 94f3671083)
Do you have write permissions to sites/default/libraries or sites/yoursite.com/libraries ? that should work as well, as far as I know.
Comment #39
ingram87 CreditAttribution: ingram87 commentedClearing the cache fixed this issue for me as well.
Comment #40
_gramur CreditAttribution: _gramur commentedFollow #37 (soxofaan) advice by making sure you have write permission to the folder. After that clear cache and the issue should be resolved.
Cheers.
Comment #41
pritamprasun CreditAttribution: pritamprasun commentedfaced the same issue but resolved.
Suggestion:
Follow the readme.txt instruction carefully.
check the permission of the library directory.
clear the cache.
Comment #42
sercandemir CreditAttribution: sercandemir commented#27 worked for me