Closed (fixed)
Project:
QueryPath
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Sep 2012 at 06:07 UTC
Updated:
30 May 2013 at 17:49 UTC
I don't see why this should be loading the library in hook_boot. If something needs it then it can run then. Also, it seems nice to use a static to know if it's loaded or not.
| Comment | File | Size | Author |
|---|---|---|---|
| querypath_dont_always_load.patch | 979 bytes | greggles |
Comments
Comment #1
mbutcher commentedI've been working on this for the 3.x branch, where it will use an autoloader instead. But now I'm thinking about adding this to the 2.x branch anyway. It's an easy enough fix.
Comment #2
gregglesautoloader seems fun. I've now actually tested this and it seems to work well. Anything blocking it from inclusion?
Comment #3
mbutcher commentedI think we should go ahead and add this to the 2.x branch. Since I'm really short on time at the moment, I've given you permissions to commit and to make the release. You are, of course, free to make other changes. I think we're totally on the same page about what a library module like this ought to do.
Comment #4
gregglesThanks, fixed - http://drupalcode.org/project/querypath.git/commit/ca5c928
I removed the static variable thing. I feel like that was a premature optimization and that php's require_once probably can do that faster/lighter than a static.
In terms of "what a library module like this should do" my sense is "nearly nothing" so I guess that works for you :)
Comment #5
jacobpov commenteddoesn't work with feeds , when I try to click start it shows a blank page now with the latest dev.
Comment #6
greggles@jacobpov - thanks for reporting that! I've opened an issue at #1801420: Update to latest QueryPath code to track it.
@mbutcher - any idea which other modules on drupal.org use QueryPath?
I think we should wait a pretty long time before making the next release just so people can upgrade. We could also consider changing this so that hook_boot is still implemented and calls querypath_include_code and does a watchdog along the way so that people know to update their code.
Comment #8
ludo.rWhat changes should be made in modules that use QueryPath?
module_load_include() ?
Here's the project : http://drupal.org/project/querypath_filter
Comment #9
greggles@dolu - I created #1817592: Update to latest querypath style of inclusion. #1801420: Update to latest QueryPath code might also be instructional.
We plan to make the release in the next 2 weeks or so. It would be great if you could make a new release by then.
Comment #10
mkalkbrennerYou cause a lot of trouble ;-)
Came from #2007906: PHP Fatal error: Call to undefined function qp() in apachesolr_confgen.module on line 77
Nevertheless I really appreciate that change because I have to use querypath 2 and 3 in parallel (on different pages of a site).
Comment #11
greggles@mkalkbrenner, I opened a half dozen or so issues to try to proactively alert people to the problem. Sorry I missed that one :(