to reproduce a warning i saw at installation, i disabled and uninstalled LDAP Authentication, Data and Groups.
after confirming to uninstall these three modules, the page shows:
"
- warning: Invalid argument supplied for foreach() in /<drupal6_path>/includes/common.inc on line 3338.
- warning: Invalid argument supplied for foreach() in /<drupal6_path>/includes/common.inc on line 3284.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapdata_binddn in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapdata_bindpw in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapdata_rwattrs in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapdata_roattrs in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapdata_mappings in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapdata_attrs in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapdata_filter_php in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_in_dn in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_dn_attribute in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_attr in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_in_attr in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_as_entries in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_entries in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_entries_attribute in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_mappings in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_mappings_filter in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_filter_php in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
- user warning: Table '<database_name>.ldapauth' doesn't exist query: ALTER TABLE ldapauth DROP ldapgroups_groups in /<drupal6_path>/includes/database.mysql-common.inc on line 322.
The selected modules have been uninstalled.
"
the first two warnings are about the warning i saw at installation; see my next issue report #1790324: enabling ldap Authentication gives 'invalid argument supplied for foreach() ...' warnings. i didn't expect to see the rest of the warnings. probably the table ldapauth is already dropped when the modules are disabled?
(context: ubuntu 10.04 lts, apache 2.2.14, mysql 5.1.63, php 5.3.2, drupal 6.16, ldap integration 6.x-1.0-beta3)
Comments
Comment #1
cgmonroe commentedThese errors can be ignored. They indicate that the ldapauth uninstall process was called before dependent modules uninstall process was called.
For historical reasons (i.e. before my time), the modules that depend on ldapauth have just add fields to the ldapauth table. So the uninstall processes for the dependent modules drop the fields from that table. However, if the ldapauth uninstall process is called first, it drops the whole table. This means that the dependent uninstalls "fail" because the table is gone... but it doesn't matter because dropping the table did the same thing.
IMHO, the module uninstall process should follow the same dependencies rules as the module enable process... but it doesn't. It just does things alphabetically. So, ldapauth uninstall gets called first.
Eventually, there should be a check to see if the table exists in the sub modules to prevent this. But it hasn't been added since the errors are rare and the uninstall actually works despite them.
Comment #2
cgmonroe commentedCode committed to git that changes the ldapdata and ldapgroups uninstall process to check for the existence of ldapauth table before attempting to drop their added fields. This will keep these messages from happening.
Next automatic -dev build will contain this.
Comment #3.0
(not verified) commentedadded link to issue 1790324.