Closed (fixed)
Project:
Apache Solr Attachments
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2013 at 18:35 UTC
Updated:
21 Aug 2013 at 20:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
posulliv commentedI also hit this issue. Attached is a patch with pretty much the fix mentioned in the original report.
Seems
$snippets['content']will always be set from looking atapachesolr_search_process_responsein the apachesolr module.Comment #2
David_Rothstein commentedI don't think $snippets['content'] is always guaranteed to be there. The fact that it isn't is what causes issues like #1946132: ERROR: Warning: implode() [function.implode]: Invalid arguments passed in theme_apachesolr_search_snippets() (line 1708 of...) in the Apachesolr module itself.
Here's a patch for this issue that relies on the one I posted over there and therefore doesn't rely on $snippets['content'] being present. I'm not totally sure what to do about the @todo, though.
Comment #3
posulliv commentedThat makes sense to me. Thanks for the pointer to the other issue; I wasn't aware of it.
Comment #4
Panther256 commentedThere is a typo in the return line of the patch. "return $vars['snippet']" should be "return $vars['snippets']":
Should be:
Otherwise, this does fix the issue for me.
Thanks!
Comment #5
David_Rothstein commentedIt's not actually a typo; that variable is introduced in the other issue. (Leaving it at $vars['snippets'] would not fix the issue here.)
Comment #6
tim-e commentedThis worked for me.
Patch attached.
Comment #7
David_Rothstein commented@tim-e, that looks like the same patch as #1?
Here is a reroll of #2 which tracks the latest patch from the other issue (#1946132-24: ERROR: Warning: implode() [function.implode]: Invalid arguments passed in theme_apachesolr_search_snippets() (line 1708 of...)). It's now using a different variable, but still the same approach.
Comment #8
jvandooren commentedPatch from #7 did not apply cleanly but I patched it manually and it fixed the issue...
Comment #9
Echofive commentedHi,
I have been the same error and I've created a (correct :) patch based on the from #7 patch.
Enjoy it now !
Comment #10
David_Rothstein commented#9 looks the same as #7 except there is an indentation problem in the code comments (see also https://drupal.org/coding-standards/docs#todo), so I think #7 is still the patch to review.
Functionally they should be the same though :)
Comment #11
nick_vhLooks great! Committing and giving credit to all of you but the commit will go to David.