Closed (fixed)
Project:
Apache Solr Views
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2009 at 19:49 UTC
Updated:
7 May 2009 at 22:50 UTC
Jump to comment: Most recent file
When using the latest apachesolr, views 2.5, and the latest apachesolr_views I had to fix three minor errors to get it working on my setup. I just started looking at the apachesolr internals, so these fixes might not be correct. If they look correct and you want them in individual patches, I can do that...but they are all 1 line changes.
warning: Missing argument 3 for apachesolr_og_apachesolr_modify_query(), called in /var/www/html/sites/all/modules/apachesolr_views/apachesolr_views_query.inc on line 220 and defined in /var/www/html/sites/all/modules/apachesolr/contrib/apachesolr_og/apachesolr_og.module on line 27.
Fix is to add the third parameter - module name (apachesolr_views).
PHP Fatal error: Declaration of apachesolr_views_query::get_filters() must be compatible with that of Drupal_Solr_Query_Interface::get_filters() in /var/www/html/sites/all/modules/apachesolr_views/apachesolr_views_query.inc on line 11
Fix is to add $name = NULL to the function declaration.
PHP Fatal error: Cannot access protected property Solr_Base_Query::$id in /var/www/html/sites/all/modules/apachesolr_views/apachesolr_views_query.inc on line 567
Fix is to change the offending variable from $query->id to just $id. This one I'm the least certain about being the correct solution.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | apachesolr_views_up.patch | 3.71 KB | Scott Reynolds |
| apachesolr_views-1.patch | 1.56 KB | tauno |
Comments
Comment #1
Scott Reynolds commentedso the last change doesn't work. This is actually because the $id field was just made protected in the last apachesolr project commit. Workin on a workaround here soon. Your fix 'works' because $id is always 0. So it really doesn't work...
The other two changes are correct though.
Comment #2
drewish commentedshouldn't apachesolr_views_query::get_filters() look more like:
seems silly to totally ignore $name param
Comment #3
drewish commentedalso after applying this patch I'm getting a new error:
Fatal error: Call to undefined method apachesolr_views_query::get_available_sorts() in modules/apachesolr/apachesolr.module on line 463It looks like the apachesolr_block() function calls $query->get_available_sorts() but the function isn't part of the Drupal_Solr_Query_Interface interface. I can't tell if we should just implement get_available_sorts() or kick it over to the apachesolr queue to have them straighten out their interface.
Comment #4
Scott Reynolds commentedNeed the method added to the interface and this class.
Ignoring the name isn't the intention, just not ready to handle it yet :-D. apachesolr moving to fast :-D
Comment #5
Scott Reynolds commentedsee #442198: Add get_available_sorts() to the Drupal_Solr_Query_Interface interface and #443252: Make protected id public again
Comment #6
Scott Reynolds commentedok apply those two patches and do a new CVS checkout. Here is the patch that i just committed
Comment #7
Scott Reynolds commented