Hello
I get this error message when trying to reindex content on the solr configuration page
warning: Invalid argument supplied for foreach() in /var/www/drupal-6.20/sites/all/modules/solr_flag/flag_solr.module on line 18.
Then the search worked but I get error message as well on the search result page
#
*
... (Object) stdClass
o
im_vid_1 (Object) stdClass
+
1 (Integer) 19
+
2 (Integer) 17
o
bs_flag_bookmarks_flagged (Object) stdClass
+
true (Integer) 1
*
Krumo version 0.2a
| http://krumo.sourceforge.net
Called from /var/www/drupal-6.20/sites/all/modules/solr_flag/flag_solr.facets.inc, line 495
and this other error message on search result page
file attached
I am running on solr 6.x-2.0-beta3
Regards
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | fix_non_flagged.patch | 1.54 KB | julien |
| Capture d’écran 2011-01-14 à 13.59.27.png | 126.21 KB | creatile |
Comments
Comment #1
mooffie commented(Sorry for not replying earlier: I wasn't "subscribed".)
Mmmm. I see that flag_get_content_flags() returns NULL, not an empty array, when a node isn't flagged. It's amazing that I haven't encountered this bug before.
Comment #2
joe_pixelrow commentedcan you show us specifically what to fix, or post a patch for this problem, I am getting the same errors as we start to add content
Comment #3
julien commentedHi,
Just found that the issue is only appearing when a node have never been flagged.
it just needed a check if the $flaggings_by_user exist to fix it.
Comment #4
mooffie commentedI've committed the patch (a very similar one, anyway). Please check it out. If it solves the problem, please close this issue.
Comment #5
julien commentedBy the way, i haven't been able to display the block facets, even with reindexing the content in Solr.
Did you change the schema.xml to index the flag field in Solr ?
When i bookmark a node and run the cron, i can see that it's going to be commited to solr.
but the block doesn't appear, any idea why?