I can't add relationships to Views generated by the Data module.

I have some external (related) tables I need to patch together for viewing, and linking from other parts of the site.

I get a white screen, with a JSON-style dump of state.

As per Cannot edit my views.. I get a JSON string? I've got jQuery Update installed and tried:

  • using a different version of jQuery for the admin (v1.5) [same result]
  • disabling jQuery Update entirely [same result]
  • disabling JavaScript for Views editing (Structure > Views > Settings > Advanced) [no error, but no relationship editing, just back to main View edit screen]
  • switching the theme for editing Views (Bartik and Seven) [same result]

NOTE: Also confirmed no PHP errors present, have cleared caches after each settings change, etc.

So, since the tables are related (actually coming from another database), I figured I'd experiment with Foreign Keys. I understand that Drupal doesn't (or didn't) natively honour them (due to breaking integrity in some cases), but I figured it might give Schema the push it needed to associate the related tables.

Foreign Keys didn't work either (in fact, now I can't update adopted tables and or set Joins).

The last option I can see is to use a programmatic approach via a custom module using hook_views_data (something like How do I display an external database data?)

Any confirmation, suggestions, etc.?

Any assistance greatly appreciated.

  • I bailed on this, having opted to go a different route (creating a custom module, doing db_query and using hook_menu + hook_theme to get the same results). In the event that somebody comes up with something clever, insightful, etc. I'll leave this open for a bit longer. Oct 15, 2014 at 15:30
  • If you are using the efq_views module, it does not currently support relationships. Aug 12, 2015 at 18:44


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.