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".

search-extender-tags.patch1.01 KBadaddinsane
FAILED: [[SimpleTest]]: [MySQL] Invalid patch format in search-extender-tags.patch. View


Crell’s picture

Component: database system » search.module
Status: Active » Needs review

I 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.

Status: Needs review » Needs work

The last submitted patch, search-extender-tags.patch, failed testing.

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +needs backport to D7

This 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).

adaddinsane’s picture

I'm afraid my patch may be rubbish - it's produced with Eclipse.

jhodgdon’s picture

You can use Eclipse to make good patches. There is documentation here:

adaddinsane’s picture

The project I'm working on isn't using Git (not my decision).

jhodgdon’s picture

The 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.

adaddinsane’s picture

What? 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.

Crell’s picture

We 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 (, 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.

jhodgdon’s picture

Status: Needs work » Closed (duplicate)