I created a Panel page which use Views context to collect children of a term and pass the context to a pane. When I view the page, an error occured. It said that function taxonomy_get_term() not found on 'ctools/views_content/plugins/relationships/term_from_view.inc'. It looks like taxonomy_get_term() function has been replaced by taxonomy_term_load() in Drupal 7. Am I correct, or am I missing module dependencies or something?
After replacing call to taxonomy_get_term() function with taxonomy_term_load(), the error message disappear, but Panels is unable to pass the context from View context to any panes.
I am not an expert in Panels, but after comparing to another working plugin there is difference in returning context. Views context returns ctools_context_create('term', $term) whereas the working plugin returns ctools_context_create('entity:taxonomy_term', $term). And after replacing the code, Panels successfully passes the context to pane.
Is this correct or am I just lucky?
oh, btw I just found something this morning, the required context should be a view whose base table is "taxonomy_term_data". Currently, the base table is "term_data".
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | ctools-update_for_d7-1532054-4.patch | 1.88 KB | dubois |
Comments
Comment #1
gantenx commentedComment #2
merlinofchaos commentedLooks like that relationship may not have been successfully ported to D7 from D6. Sigh.
Comment #3
hazah commentedThe steps outlined seemed to have worked for me, any movement into committing a fix?
Comment #4
dubois commentedSharing simple patch with the suggested changes for our build scripts.
Comment #4.0
dubois commentedfound that the required views context base table is term_data.
Comment #5
bpiwowar commentedI can confirm the issue (in 7.x-1.4) and that the patch from @dubois is working.
Comment #6
b-prod commentedPatch from dubois fixes the issue (comment #4).
It applies well on the current DEV version.
Comment #7
japerryOh simple porting issue. Fixed.