I've been using Mollom successfully (and very gratefully) for a while now. But after a Drupal Core update, I'm getting an error every time I try to submit a Mollom regulated form.

Fatal error: Call to undefined function libraries_detect() in ....www/www/sites/all/modules/mollom/mollom.module on line 2941

I see that this was an issue in the Drupal 6 version, but I don't think that the solution there will work here.

I have Libraries installed.
I noted, on the line noted in the error, that there seemed to be a type (it was calling the "swfoject" library -- rather than the "swfobject" library).
Fixing that type did not change anything.
Installing the swfobject library does not seem to have changed anything.

Of course, when I turn off Mollom, I get spam users like crazy.

Anyone out there with any thoughts on how to fix? I checked the dev branch of the module but the code looks the same.

Thanks in advance!

Comments

s_leu’s picture

I encountered the same problem after i updated a site using drush pm-update. The problem was that drush pm-update didn't update the libraries module which was still on version 7.x-1.0 after drush pm-update ran successfully.

So actually the problem seems to be that libraries doesn't get updated proper and therefore other modules that use new API functions crash due to the old libraries version.

I noted, on the line noted in the error, that there seemed to be a type (it was calling the "swfoject" library -- rather than the "swfobject" library).

I also noticed that and yes i also think "swfobject" is right.

  • Commit fac6e66 on 6.x-2.x by eshta:
    Issue #2236319 by eshta: Corrected typo in SWFObject library retrieval.
    

  • Commit 5876154 on 7.x-2.x by eshta:
    Issue #2236319 by eshta: Corrected typo retrieving SWFobject library.
    
eshta’s picture

The swfoject is embarassing. I've corrected that right away and it's posted in the development branches of both the D6 and D7 modules. The D7 development module does now include a function_exists call around the libraries_detect function to handle both old and new libraries versions so it should still work in this case. I'll be releasing a new version shortly that includes this is a release rather than the development branch.

eshta’s picture

Status: Active » Fixed

I'm going to mark this as fixed from Mollom's end. Sounds like there is still an issue with drush and the libraries installation, but that's outside the realm of this list. Feel free to re-open if you find anything different than that.

edboost’s picture

eshta,

Thanks so much for the quick response. The typo was actually kind of fun for me -- I am not much of a coder and I was kind of tickled to discover the mistake. Less tickled when it did not solve the problem. :)

Thanks for the quick response here. Appreciate it.

And, if, in this process, I learn anything else that isn't reported here, I'll update the thread even though it's closed.

Thanks again!

edboost’s picture

Confirming that fixing the typo and updating to the newest version of Libraries seems to fix this issue.

Thanks!

Status: Fixed » Closed (fixed)

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

  • Commit 5876154 on 7.x-2.x, fbajs by eshta:
    Issue #2236319 by eshta: Corrected typo retrieving SWFobject library.