Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
joshua.albert CreditAttribution: joshua.albert commentedComment #2
vsignorile CreditAttribution: vsignorile commentedHas there been any progress made on this issue? I'm receiving the same error. Thank You
Comment #3
Dave_Martin CreditAttribution: Dave_Martin commentedSeeing 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.
Comment #5
tralfers CreditAttribution: tralfers commentedI 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.
Comment #6
aniket.mohite88 CreditAttribution: aniket.mohite88 commentedMy Final Solution.
Thanks to Dave_Martin & tralfers for their valuable inputs.
Steps -
UPDATE `system` SET `schema_version` = '7200' WHERE `system`.`filename` = 'sites/all/modules/contrib/ldap/ldap_user/ldap_user.module';
Resources
Hope this helps.
Regards,
Aniket Mohite
Comment #7
grahlI'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.