Notice: Undefined index: type in FacetapiAdapter->buildRealm() (line 820 ... /sites/all/modules/facetapi/plugins/facetapi/adapter.inc).

see also : #1395224: Empty facet behavior plugin is executed on facets that fail dependencies

CommentFileSizeAuthor
#1 facetapi-adapter.inc-1433008-1.patch697 bytesosopolar

Comments

osopolar’s picture

StatusFileSize
new697 bytes

FIX: check with empty().

cpliakas’s picture

Status: Active » Needs work

Thanks for the patch. The fix looks good, but ideally we shouldn't have to even call empty() since it is roughly 20% slower that just passing the value to if(). This is splitting hairs, but if we could avoid it that would be my preference. I'd rather make sure $this->dependenciesPassed[$facet['name']] is set for all facets.

Thanks for discovering the bug,
Chris

cpliakas’s picture

Status: Needs work » Postponed (maintainer needs more info)

So looking at this further, $this->dependenciesPassed[$facet['name']] is set for all active facets, meaning that an inactive facet is being processed for some reason. To me that is a bigger issue, so I need some more information to continue working on this.

osopolar’s picture

Status: Postponed (maintainer needs more info) » Active

Yes you are right, it is a bigger issue and patch 1 seems not to be necessary. I use the facet blocks in a Panel page together with a search_api view to search. The blocks are on the left and the view is on the right side, therefore the blocks get rendered before the view. I guess this is the problem. I need to render the facet blocks first. For a workaround see: #1018420: Allow the possibility to control the order in which content is rendered #15.

cpliakas’s picture

Status: Active » Closed (duplicate)

Thanks for debugging and reporting back. Based on this information, I am going to close as a duplicate of #1417456: Facets on non-search Search API pages broken by facetapi_block_list_alter removing the block since this seems to be related to the underlying cause.

Thanks,
Chris