Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
search.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 May 2011 at 09:39 UTC
Updated:
29 Jul 2014 at 19:32 UTC
The search extender tag added in the execute() method of class SearchQuery, is added too late and never called as a hook nor is it visible in hook_query_alter(). Likewise the normalize metaData added here is never available.
There is no penalty in moving the tag and metaData earlier in the process which the attached patch does. I have also taken the liberty of adding a tag which is just "search" as well as the pre-existing "search_$module".
| Comment | File | Size | Author |
|---|---|---|---|
| search-extender-tags.patch | 1.01 KB | adaddinsane |
Comments
Comment #1
Crell commentedI have no objection in principle, I think. It looks like there's two issues tied up in this patch, though, since I don't know what the second stanza is doing.
This also isn't really a DB issue, but rather a search module issue.
Comment #3
jhodgdonThis looks OK to me -- the only new bit is adding a tag "search" to the query, which costs nothing and has no bad consequences as far as I can tell. The normalize meta-data and the search-module tag were in there previously, so have just moved earlier in the query formation process.
However, the test bot cannot apply the patch. And it needs to be patched against 8.x first, then backported to 7.x (which should be trivial, as probably nothing has changed in 8.x in this code yet).
Comment #4
adaddinsaneI'm afraid my patch may be rubbish - it's produced with Eclipse.
Comment #5
jhodgdonYou can use Eclipse to make good patches. There is documentation here:
http://drupal.org/node/1077484
Comment #6
adaddinsaneThe project I'm working on isn't using Git (not my decision).
Comment #7
jhodgdonThe Drupal project uses Git. I don't understand how your project's use of Git is related to Drupal's use of Git? You should still be able to follow the instructions to get the Drupal source in Git and make a patch?
Or perhaps someone else can follow the patch you made and reroll so it will apply.
Comment #8
adaddinsaneWhat? Do we have to get into a major thing on this? I said the project I'm working is *not* using Git. I just noticed the problem, described the problem and threw out a hopeful patch of my local fix. It won't apply. Sorry.
As has been pointed out it's not exactly major.
Comment #9
Crell commentedWe can only take patches that are formatted in "universal" format, with an a/b prefix on paths. It doesn't matter what your project is using; you can use whatever you'd like for it. But the patch format needs to be the format that our test bot can handle.
The easiest way to do that is to simply clone a fresh copy of Drupal (http://drupal.org/node/3060/git-instructions), make your changes there (apply your patch if that's easiest), and then make a new patch with git. Then post that patch.
You don't need to touch your project's repository at all.
Comment #10
jhodgdonDuplicate of #1435834: Cannot alter search queries, tag added too late