Greetings,

I tried installing PURL (I have CTools installed and enabled) but upon enabling PURL I received the following error:

Fatal error: Call to undefined function ctools_include() in .../sites/all/modules/purl/purl.module on line 710

If anyone has any idea of what could be causing this, and a (possible) solution I'd appreciate your insight.

Thank you!

Scott

CommentFileSizeAuthor
#4 purl-706250.patch662 byteslelizondo

Comments

yhahn’s picture

Status: Active » Postponed (maintainer needs more info)

This is very strange - I'm not really sure what could cause this. If you reinstall both modules - FYI, you can do this easily with the Devel module - does it continue to occur?

scott859’s picture

Version: 6.x-1.0-beta8 » 6.x-1.0-beta9

Yes, I still got the error when re-installing both modules (using PURL 6.x-1.0-beta10).

I did find something from a post in the C-Tools Issues that worked:

(from post #11)

"My solution was to add the following as the first line for _purl_options function, but not sure this is how it should be corrected:

module_load_include('module', 'ctools', 'ctools');"

This stopped the error but I too am not sure if this how it should be corrected.

lelizondo’s picture

Version: 6.x-1.0-beta9 » 6.x-1.0-beta10
Status: Postponed (maintainer needs more info) » Active

subscribing. I'm having the same error with beta10. It is annoying since ctools is installed

your solution works.

lelizondo’s picture

Status: Active » Needs review
StatusFileSize
new662 bytes

attaching patch for solution in #2

yhahn’s picture

Status: Needs review » Needs work

So... I appreciate the patch but surely you find this humorous as well?

You are asking Drupal to load the .module file of a dependency that is supposedly already enabled. This needs further investigation, not duct tape : )

lelizondo’s picture

I know, but is "a" solution until it gets fixed. I just couldn't do anything because of this bug.

yhahn’s picture

Was the location of CTools moved at all by any chance? This is my only thought, e.g. that the location of the module as described in the {system} table does not match the actual location of CTools, even though it is "enabled". Under these circumstances, Drupal can usually update the system table to reflect the location accurately but I can see that under some situations it might break before it can...

lelizondo’s picture

No, I was using ctools and purl with a custom distribution I'm making and the error shows up in the installation. I was 100% certain that ctools was installed *before* purl, but still, the problem didn't go away until I applied the patch.

juliangb’s picture

I've also come across this - whilst upgrading my managing news installation.

Have duck taped with the patch for now too!

Versions of purl is 6.x-1.0-beta9 and ctools is 6.x-1.3. Ctools was already present before the update.

pounard’s picture

In case it could help, I had this kind of errors with CTools when using an OPcode cache, sometimes APC fails on caching ctools include files (weird, isn't it? it nevers failed on any other module, sometimes CTools does some weird stuff..) then restarting the web server to flush cached code can help.

Browsing ctools code I saw sometimes it tries to load the same file with an absolute then a relative path, and this kind of behavior can turn any opcode cache really insane.

yhahn’s picture

Status: Needs work » Postponed (maintainer needs more info)
bblake’s picture

Has anyone experience this issue recently? If so, please provide more details about versions and what actions triggered it.