I noticed this had gone missing a couple days ago and have been asking in #drupal-infrastructure and getting no answer so am filing an issue. Can we have it back, please? :)

Thanks,

Michelle

Comments

gerhard killesreiter’s picture

Project: Drupal.org site moderators » Drupal.org infrastructure
Component: Textual improvements » Solr

moving

damien tournoud’s picture

Project: Drupal.org infrastructure » Apache Solr Search
Version: » 6.x-1.x-dev
Component: Solr » Code

Seems to be a bug in the Apachesolr module itself.

On this page:

http://drupal.org/search/apachesolr_search/test?filters=type:project_pro...

This code returns an empty array for $queryvalues:

    $apachesolr_has_searched = apachesolr_has_searched();

    $queryvalues = array();
    if ($apachesolr_has_searched) {
      $query = apachesolr_current_query();
      $queryvalues = $query->get_url_queryvalues();
    }

So either apachesolr_has_searched() is false, or there is something wrong with get_url_queryvalues(). (probably the former).

michelle’s picture

Thanks for looking into this. :)

Michelle

pwolanin’s picture

Ah, I see - I moved the form building so that we could do away with checking $_POST. But that breaks the form_alter's use of _has_searched().

In fact - the search has not yet run when the form is built.

pwolanin’s picture

StatusFileSize
new1.21 KB

Here's a patch with one approach that could work - not ideal - but basically accounts for the possibility that forms may exist in the search results.

pwolanin’s picture

Status: Active » Needs review
pwolanin’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs review » Patch (to be ported)

committed to 6.x-1.x

pwolanin’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Patch (to be ported) » Needs review
StatusFileSize
new1.1 KB

Actually, that check is too generic, I think this is the most specific one we can use?

pwolanin’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs review » Patch (to be ported)

committed #8 - needs to be ported to other branches.

robertdouglass’s picture

Well, the 6.2 branch has this function significantly rewritten. First we need to confirm that the bug actually exists.

robertdouglass’s picture

Status: Patch (to be ported) » Closed (cannot reproduce)

This bug doesn't exist in 6.2 as far as I can tell.