Looking at my admin/reports/status page, I see this error:

User Fields for LDAP User Module Missing	
Fields are added to the Drupal User entity for LDAP User module functionality. These fields should have been created in LDAP User update 7203. The following userfields are missing:

    ldap_user_puid_sid
    ldap_user_puid_sid instance
    ldap_user_puid
    ldap_user_puid instance
    ldap_user_puid_property
    ldap_user_puid_property instance
    ldap_user_current_dn
    ldap_user_current_dn instance
    ldap_user_prov_entries
    ldap_user_prov_entries instance
    ldap_user_last_checked
    ldap_user_last_checked instance
    ldap_user_ldap_exclude
    ldap_user_ldap_exclude instance

Rerun update 7203 to correct this; it will not write over destroy existing fields.

The code is being output from ldap/ldap_user.install in the function ldap_user_requirements()

The field data tables are in my database:

field_data_ldap_user_current_dn                    
field_data_ldap_user_last_checked                  
field_data_ldap_user_ldap_exclude                  
field_data_ldap_user_prov_entries                 
field_data_ldap_user_puid                          
field_data_ldap_user_puid_property           
field_data_ldap_user_puid_sid

I've forced a re-check and re-run the 7203 database update, but the fields still aren't being built, and Im still getting the error. Currently, the db version in the system table is 7205 - should be good.

Comments

joshua.albert’s picture

Issue summary: View changes
vsignorile’s picture

Has there been any progress made on this issue? I'm receiving the same error. Thank You

Dave_Martin’s picture

Seeing the same error here and having the same issue.

Edit to add: I figured out how to correct this. Not for the faint of heart and you will want to be very sure that you have backed up your database just in case.

This link explains what you need to modify in the database to get update.php to run the updates again. In this particular case it is the ldap_user module that you want to rerun.

As described in the link above you will want to change the value of the schema_version column so update knows that it needs to update things. In my case I changed the value from 7205 to 7203. Once you've done that you need to visit update.php at your sites URL and let the database updates happen.

If you get errors that says certain tables are already in the database simply drop those tables and run update.php again. I ended up simply deleting all of the tables that started with field_data_ldap and field_revision_ldap so update.php would run without error. I did NOT lose any data doing this but, again, make a backup of your database before going down this path.

tralfers’s picture

I had the same issue and can verify that the solution Dave_Martin posted works. Thanks Dave!

In my case though, I changed the schema_version to 7200. And to reiterate, absolutely positively back up your database first, because the first time I tried this solution my site went into a persistent error state and I had to restore from backup.

I also tried dropping only the specific field data tables reported as missing on the status report page, but that was ineffective. The 7203 update recreates them, then update.php reports the update failed because the tables already exist. All tables beginning with field_data_ldap and field_revision_ldap had to be dropped before the update could proceed successfully.

aniket.mohite88’s picture

My Final Solution.

Thanks to Dave_Martin & tralfers for their valuable inputs.

Steps -

  1. Backup Database
  2. Drop the below LDAP related tables in the database. This is based on #3, where Dave_Martin mentioned the issue of existing LDAP User field tables. I faced the same issue. So I had to drop LDAP User related field data & revision tables. Refer this for more info, on how I got this drop table query.

    DROP TABLE field_data_ldap_user_current_dn,field_data_ldap_user_last_checked,field_data_ldap_user_ldap_exclude,field_data_ldap_user_prov_entries,field_data_ldap_user_puid,field_data_ldap_user_puid_property,field_data_ldap_user_puid_sid;
    
    DROP TABLE field_revision_ldap_user_current_dn,field_revision_ldap_user_last_checked,field_revision_ldap_user_ldap_exclude,field_revision_ldap_user_prov_entries,field_revision_ldap_user_puid,field_revision_ldap_user_puid_property,field_revision_ldap_user_puid_sid;
    


  3. Reset the schema update version value (for this module - ldap_user) in "system" table of the database. Again, I set this to 7200 based on comment #5 above by tralfers.

    UPDATE `system` SET `schema_version` = '7200' WHERE `system`.`filename` = 'sites/all/modules/contrib/ldap/ldap_user/ldap_user.module';

  4. Run Update.php or "drush updb" in command line. I prefer the drush command



Resources

Hope this helps.

Regards,
Aniket Mohite

grahl’s picture

Status: Active » Closed (outdated)

I'm closing this issue since we likely cannot do anything useful on LDAP's end and users have a workaround to apply their updates described above.