Views 6.x2.8
Schema 6.x-1.7
Table Wizard 6.x-1.1
CiviCRM 2.2
I installed Schema and Table Wizard this morning but when I attempt to add existing tables I first see a progress bar showing "Analyzed 0 out of 0 tables" and then I get the error
warning: Invalid argument supplied for foreach() in /mnt/data/websites/clients/client14/web39/web/sites/all/modules/tw/tw_pages.inc on line 329.
I mention CiviCRM above just in case there is some sort of incompatibility.
I saw a similar matter when searching through old issues but it was in connection with relationships and is supposed to be fixed. Sorry I don't have more details but I am not sure where else to look.
This module looks like it will be really useful if I can get it working and exactly fits a number of my needs.
Thank you
Steven
Comments
Comment #1
mikeryanCould you try the current dev release of Table Wizard (6.x-1.x-dev)?
Comment #2
midloman CreditAttribution: midloman commentedI'm getting the same error, also trying to use civicrm tables that are inside the drupal DB. I'm using Civicrm 3.1.3
I did install the dev release of TW. There seems to be no combination of db_urls and prefix entries that will not generate this error.
It does turn out that since my civicrm tables are inside the drupal db, I can add them from the default set.
Feel free to contact me for more info.
Comment #3
midloman CreditAttribution: midloman commentedThis is an update on my previous post. What may not be obvious to non-php folks out there, is that you need to comment out the original "$db_url = 'mysql://username:password@localhost/databasename';" line that you placed in the settings.php file when you installed Drupal.
If you do this, and follow the instructions for adding external tables, this does work. for instance:
$db_url['default'] = 'mysqli://username:password@localhost/pmi_drupal'; (my drupal tables are not prefixed)
$db_url['civicrm'] = 'mysqli://username:password@localhost/pmi_drupal'; (my civicrm tables are prefixed)
$db_url['epiware'] = 'mysqli://username:password@localhost/pmi_project_db'; (my epiware tables are in a different db, and not prefixed)
In TW, the civicrm db seems to include all of the drupal tables (that's ok, I can see all of them).
and I can also access the epiware tables.
The product still seems to ignore any prefixing settings.
Comment #4
stevecowie CreditAttribution: stevecowie commentedI have a similar problem using two databases: one for Drupal and the other for civicrm
The connection strings I'm using are:
$db_url['default'] = 'mysqli://username:password@localhost/drubaldb';
$db_url['civicrm'] = 'mysqli://username:password@localhost/civicdb';
With this setup the default tables are not available for adding at all, so I added a further connection
$db_url['drupal'] = 'mysqli://username:password@localhost/drubaldb';
This makes the tables show up, but I was getting some odd results when analyzing tables such as report of no primary key on a table that does have one.