Closed (fixed)
Project:
Apache Solr Search
Version:
6.x-3.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2012 at 16:05 UTC
Updated:
22 Jun 2013 at 21:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
seddonym commentedJust as an experiment I replaced the following:
This seemed to get the module basically working, but not very smoothly. I haven't the time to test it now but thought it would be helpful to report.
Comment #2
epiraces commentedI got the same issue. I'll try what you suggest but it would be would to get input from others too.
Comment #3
epiraces commentedFor what is worth, if Facets API is disabled, at least results are displayed.
Comment #4
sja1 commentedI'm experiencing the same error.
Fatal error: Call to undefined function field_info_field() in path_to_module/facetapi/plugins/facetapi/dependency_bundle.inc on line 20Changing priority to critical as this would seem to make the module unusable.
Comment #5
nick_vhSeems this is a facetapi problem right?
Comment #6
sja1 commentedYes, thanks for redirecting to the correct queue!
Comment #7
voidberg commentedComment #8
rares commentedThe solution in #1 also worked for me (patch below). To fix this, I actually patched apachesolr.module. So I think this issue belongs in the apachesolr queue.
While testing I found that the facets for nodereference fields were not showing the titles of the related nodes. After debugging I found that the 6.x-3.x facetapi.module expects the map callback to return a simple array of type
$map[$key] = $value;(instead of$map[$key]['#markup'] = $value;). My patch also addresses this issue.Comment #9
relaxy commentedThere is also a Facet API issue.
Facet API module calls the function field_info_field on line 20 in the dependency_bundle.inc module.
However field_info_field is a part of Drupal 7 API and should not be used inside of the Drupal 6 module.
Comment #10
rares commentedLooked more closely at the thread. Looks like the OP reported the issue in the context of apachesolr.module, and #4 reported the function being called in facetapi (dependency_bundle.inc). Calls to these D7 Content functions exist in both. My patch solves the issue in the apachesolr module and makes the facets work inside solr search. Perhaps I should file a similar issue in the apachesolr queue?
Comment #11
cpliakas commentedComment #13
relaxy commentedYep. The problem should be fixed on the both sides.
(#4) still exists even after the patch.
Comment #14
voidberg commentedThe patch in #8 is for apachesolr so once we fix the issue in #4 we should move it back to the apachesolr module queue. It works in this context as long as you don't have any facets that have a dependency set otherwise it will crash.
I am attaching a patch that removes the call to field_info_fields.
Comment #15
voidberg commentedCommited to 6.x.
http://drupalcode.org/project/facetapi.git/commit/aa5ed3b
Comment #16
voidberg commentedI am moving this issue back into the apachesolr queue as the issues in Facetapi have been fixed.
Comment #17
rares commentedresubmitting patch in #8. hope the test bot accepts this.
Comment #18
relaxy commented#17: solrpatch2.patch queued for re-testing.
Comment #19
nick_vhIs this also a problem in 7.x-1.xm, if so - we need to solve that first? I have a hard time following the flow herenevermind - I'm being stupid :) Please, make the patch name a little more clear (at least the issue number in the filename)
Comment #20
nick_vhAside of that, the patch looks good - just rename it so it can be tracked
Comment #21
pwolanin commentedcpliakas says you need to use #value in place of #markup in the patch, rather than assigning the HTML to the bare array element.
Comment #22
pwolanin commentedsee:
http://api.drupal.org/api/drupal/developer%21topics%21forms_api_referenc...
vs
http://api.drupal.org/api/drupal/developer%21topics%21forms_api_referenc...
Comment #23
pwolanin commentedre-roll
Comment #24
pwolanin commentedactually the #html should still be there too?
Comment #25
pwolanin commentedanyone want to test?
Comment #26
wonder95 commentedI was able to apply the patch to the latest dev and it got rid of the error.
Comment #27
cedric_a#25 is ok for me too, no more php fatal error when using facets dependencies, thanx.
Comment #28
pwolanin commentedcommitted.