We are using Drupal 7.22, Views 3.7 and we just upgraded to CiviCRM 4.3.7.
We use views to expose civicrm contact information in drupal pages. Right after the Civi upgrade all the pages are working fine except one that is showing the following error:
"Fatal error: Call to undefined method stdClass::build_join() in sites/all/modules/views/plugins/views_plugin_query_default.inc on line 1313"
In the log report the error is more specific:
"Notice: Undefined index: relationship in views_plugin_query_default->ensure_table() (line 606 of sites/all/modules/views/plugins/views_plugin_query_default.inc)."
When I edit the views involved in that page in the preview the content is shown perfect and there is no error, the error is just when trying to load the page.
Any ideas!
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#12 | 2124163-12.patch | 606 bytes | renatog |
|
Comments
Comment #1
zetxek CreditAttribution: zetxek commentedAny update on the issue? It seems to be happening in the latest version too
Comment #2
michielkenis CreditAttribution: michielkenis as a volunteer commentedI have exactly the same issue after updating Views 3.11 to 3.14. Any updates?
Comment #3
firoz2456 CreditAttribution: firoz2456 as a volunteer and commentedAny updates regarding this issue?
Comment #4
MustangGB CreditAttribution: MustangGB commentedIs this still a problem?
Comment #5
dmudie CreditAttribution: dmudie commentedStill getting this: PHP Fatal error: Call to undefined method stdClass::build_join() .../views_plugin_query_default.inc on line 1316
Drupal 7.56
PHP 5.3.3
Views 7.x-3.18
Comment #6
dnmurray CreditAttribution: dnmurray at Phase2 commentedI ran into this issue today, and the first google hit was this issue. My problem was due to custom code trying to add a join to a view, but not using a `new views_join()` as the initial object. Default is to create a StdClass which was incorrect. It needs to be a views_join object.
Comment #7
MustangGB CreditAttribution: MustangGB commentedI'm going to say dnmurray is correct, this looks like either custom code, or another module, not using a
views_join()
when it should be.Comment #8
isa.belwe are facing this issue after version 3.20, after trying some things, we could solve it by adding
isset($table["table"]
to views_plugin_query_default.incI'm attaching the patch, hope it can be useful to someone else.
Comment #9
isa.belSorry, wrong name.
Comment #10
isa.belComment #11
renatog#9 really looks good to me. Moving to RTBC
Comment #12
renatogPatch re-rolled
With the same solution of Isabel on #9
Comment #13
DamienMcKennaStill tempted to mark this "won't fix" because it's failing because of custom code or another module.
How about we add some logic to specifically catch for the error and throw an exception with a message that explains the problem along with how to fix it?
Comment #14
renatogTotally agree. It really makes sense