Notice: Undefined index: centers in ctools_terms_from_node_context() (line 38 of sites/all/modules/contrib/ctools/plugins/relationships/terms_from_node.inc).

I am receiving the following error with vocabularies added to a node after I created page manager page variant with a "multiple terms from node" relationship context with a few vocabularies checked. Since the conf for this context doesn't get updated with new vocabularies, when comparing fields for those new vocabularies to the old list, some indexes don't exist, hence the PHP Notice.

Files: 
CommentFileSizeAuthor
#1 multiple_terms_node_relationship-1954794-2.patch926 bytesrsmylski
PASSED: [[SimpleTest]]: [MySQL] 121 pass(es).
[ View ]

Comments

StatusFileSize
new926 bytes
PASSED: [[SimpleTest]]: [MySQL] 121 pass(es).
[ View ]

The supplied patch adds a !empty() check and will stop the notice.

Status:Active» Reviewed & tested by the community

I too am getting this. The patch solved my problem, but i feel though it may just be a temporary fix.

I have a panel variant on node_page, one for each content type. The particular variant this error is coming from is NOT the variant the page ends up matching (Simple match by content type), but because the #weight is before the one that does match, it processes it anyway. The variant this error comes from has the 'multiple terms from node' context, which is passed through as an argument to a view.

I think some optimisations should be done here, as I did a backtrace to find where this was coming from - perhaps in another ticket, and maybe in Panels? If a selection rule is not using a context, then we should not process that particular context during the load. It seems like a massive overhead to be doing this when it's not required.

The simple fix. RTBC

Issue summary:View changes
Status:Reviewed & tested by the community» Fixed

Status:Fixed» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.