On upgrade of apachesolr modules to beta7
[Fri Apr 10 21:11:34 2009] [error] [client 127.0.0.1] PHP Fatal error: Unsupported operand types in /var/www/versions/blocks/modules/apachesolr/contrib/apachesolr_og/apachesolr_og.module on line 101
Patch adds isset to check that the facet was enabled.
Note, the scenario to produce this error is not likely unless the previous apachesolr_og patch was installed, the user enabled the facet block, upgraded to a solr version that now included 'enabled-filters' such as beta7, and went to the admin blocks page.
Comments
Comment #1
pwolanin commentedOk, we should also update this module to use the negative query functionality for nodes not in any group ASAP.
See the code I added for book module integration.
Comment #2
pwolanin commentedcleanup patch incorporating the one above.
Comment #3
pwolanin commentedI think the query in the update function is wrong - will only update groups, not nodes *in* groups.
Comment #4
aufumy commentedAdded update to og_ancestry for nodes in groups
Comment #5
pwolanin commentedoddly, OG doesn't consider group nodes themselves to be in in a groups, at least not looking at the og_nodeapi code from 6.x-1.3. Will have to ask Moshe about that.
Should there be a different facet for nodes that are groups? Should we try to index the, as if they were in the group corresponding to their own nid?
Comment #6
aufumy commentedGood point. That makes sense to me.
Comment #7
pwolanin commentedMoshe says that a group node should not appear within the facet list for that groups (but that some might feel otherwise). Let's get the basic fix in here (which means removing the query against {og}) but maye you can roll a patch to add a configurable option to also index groups nodes with their own nid as gid?
Comment #8
aufumy commentedAdded checkbox to apachesolr og admin section, and if checked than index group nodes within that group.
Just rolled it, will check code tomorrow.
Comment #9
aufumy commentedTested this patch, when admin checkbox for indexing group nodes within their group, facet block includes their count.
Comment #10
pwolanin commentedshould the admin page be under admin/og? That might make more sense?
Comment #11
pwolanin commentedwe don't want or need a separate perm. Also, need to mark group nodes for re-indexing.
committing this to 6.x
Comment #12
pwolanin commented