Hi,

I have a request of code addition so the apache solr views module facets work fine, this is the fix that the module needs to remove so extra slashes generated when the solr query has a path as in the case of a view in the apachesolr.module getPath function.

public function getPath($new_keywords = NULL) {
    if (isset($new_keywords)) {
      return $this->base_path . '/' . $new_keywords;
    }
    if($this->getParam('q')) {
      return $this->base_path . '/' . $this->getParam('q');
    }else {
      return $this->base_path;
    }
  }

Thank you in advance.

Julian Mancera

Comments

nick_vh’s picture

Please make a patch that can be tested and reviewed

julianmancera’s picture

Here is the path Nick

Regards,

Julian Mancera

nick_vh’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, apache-solr-views-1538244-comment-5886574.patch, failed testing.

nick_vh’s picture

Status: Needs work » Needs review
nick_vh’s picture

@julianmancera Can you link to the related issue for this?

Status: Needs review » Needs work

The last submitted patch, apache-solr-views-1538244-comment-5886574.patch, failed testing.

nick_vh’s picture

Version: 7.x-1.0-beta10 » 7.x-1.x-dev
nick_vh’s picture

Status: Needs work » Needs review
julianmancera’s picture

Hi Nick,

I reviewed the test log and this is the error

Next exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupaltestbotmysql.simpletest766366registry' doesn't exist' in /var/lib/drupaltestbot/sites/default/files/checkout/includes/database/database.inc:2136

Seems to be a testing enviroment related error.

Can you please confirm?

Regards,

Julian

nick_vh’s picture

That has been taken care of already. Was indeed drupal.org testbot. What is the issue (number) in apachesolr views so people can test this change?

julianmancera’s picture

Nick,

Here is the issue.

http://drupal.org/node/1428628

Regards

Julian Mancera

pwolanin’s picture

StatusFileSize
new598 bytes

I like elseif () better

pwolanin’s picture

Title: Apache Solr quick fix so Apache solr Views facets works fine » Solr base query adds an extra slasj in getPath() when there is no 'q' param

update title to reflect actual bug

pwolanin’s picture

Status: Needs review » Fixed

fixed in 7.x-1.x and 6.x-3.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.