Closed (won't fix)
Project:
Lightweight Directory Access Protocol
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
20 Aug 2012 at 00:37 UTC
Updated:
9 Feb 2017 at 03:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
johnbarclay commentedComment #2
johnbarclay commentedI committed a patch for this to 7.x-2.x-dev. It needs testing and there is still manual configuration that needs to be done afterward, particularly related to ldap authorization and provisioning to drupal because of changes in ldap servers, ldap authorization, and the new ldap user module.
Please test. Here are my test scripts:
Comment #3
yalet commentedI received the following output from drush after following your update instructions:
Comment #4
johnbarclay commentedThanks. The 2 issues were a bad format for enabling ldap_user module and failing to check for existing field. The fix is committed and is http://drupalcode.org/project/ldap.git/commitdiff/45b21f47c21193f76bd85d...
@yalet, you'll need to enable ldap_user module; it is leveraged by ldap_authentication, ldap_authorization and replaces ldap_provisioning.
Comment #5
yalet commentedI restored my database to pre-update, applied the patch for that commit, and re-ran drush updatedb. I received only one error this time (another field rename error):
Comment #6
johnbarclay commentedThanks for following through on this. I committed a patch to fix this as well as the other remaining db field change function that doesn't check for field's existence. See http://drupalcode.org/project/ldap.git/commitdiff/5738743677c576a2a7f189...
Comment #7
yalet commentedI reverted my database and my code back to pre-upgrade. Then I downloaded the 7.x-2.0beta3, and applied both patches from this thread, and reran drush updatedb. Everything passed this time.
(I'm not sure if the patches were meant to be applied against 7.x-2.0beta3 or 7.x-2.x-dev, but I thought it would be useful to try out anyway, so here's a data point if it is at all relevant).
Actually, now that I read the Version field for this issue I see it was specifically about 7.x-2.x-dev, but whatever, worked anyway.
Comment #8
johnbarclay commentedgreat. thanks.
Comment #9
humansky commentedI'm attempting to upgrade from 7.x-1.0-beta12 to 7.x-2.x-dev and when I run drush updb I get the following error:
Do you wish to run all pending updates? (y/n): y
Performed update: ldap_servers_update_7106 [ok]
Performed update: ldap_servers_update_7107 [ok]
Performed update: ldap_servers_update_7108 [ok]
Performed update: ldap_servers_update_7109 [ok]
Performed update: ldap_servers_update_7110 [ok]
Performed update: ldap_servers_update_7111 [ok]
Performed update: ldap_servers_update_7112 [ok]
strtr(): The second argument is not an array syslog.module:115 [warning]
Performed update: ldap_servers_update_7201 [ok]
Performed update: ldap_servers_update_7202 [ok]
Performed update: ldap_authorization_update_7201 [ok]
Performed update: ldap_servers_update_7203 [ok]
Performed update: ldap_authorization_update_7202 [ok]
Cannot add field ldap_servers.picture_attr: field [error]
already exists.
Performed update: ldap_servers_update_7204 [ok]
Performed update: ldap_authorization_update_7203 [ok]
Performed update: ldap_query_update_7102 [ok]
Finished performing updates. [ok]
Then I tried again, dropped the database, re-imported the old database, then ran drush updb, now I get a different error:
Do you wish to run all pending updates? (y/n): y
Performed update: ldap_servers_update_7106 [ok]
Performed update: ldap_servers_update_7107 [ok]
Performed update: ldap_servers_update_7108 [ok]
Performed update: ldap_servers_update_7109 [ok]
Performed update: ldap_servers_update_7110 [ok]
Performed update: ldap_servers_update_7111 [ok]
Performed update: ldap_servers_update_7112 [ok]
strtr(): The second argument is not an array syslog.module:115 [warning]
Performed update: ldap_servers_update_7201 [ok]
Performed update: ldap_authorization_update_7201 [ok]
Performed update: ldap_servers_update_7202 [ok]
Performed update: ldap_authorization_update_7202 [ok]
Cannot rename field ldap_servers.testingDrupalUserDn to class="placeholder">testing_drupal_user_dn: target field already exists.
Performed update: ldap_servers_update_7203 [ok]
Cannot rename field ldap_authorization.useFirstAttrAsGroupId to class="placeholder">use_first_attr_as_groupid: target field already exists.
Performed update: ldap_authorization_update_7203 [ok]
Performed update: ldap_query_update_7102 [ok]
Finished performing updates. [ok]
Any thoughts?
Comment #10
mikran commentedI got same error as #9, ldap_servers.picture_attr already exists. I tried to repeat this twice and the result did not change. I didn't have ldap_authorization enabled, so maybe that and changing order how these updates are ran explains the difference in errors?
Comment #11
yalet commentedThis patch should solve the
Cannot add field ldap_servers.picture_attr: field already exists.error.Comment #12
johnbarclay commented#11 is committed. Thanks.
Comment #13
yalet commentedI don't see the commit. Is it somewhere other than 7.x-2.x?
Comment #14
Caveat4U commentedCould you please commit this patch to the most recent version of ldap? It doesn't look as though this actually got committed.
Thanks!
Comment #15
johnbarclay commentedI applied #11 and pushed it out.
Comment #16
byrond commentedThis patch should solve the
Cannot add field ldap_servers.followrefs: field already exists.error.Comment #18
grahlSince the current recommendation is to keep 1.x sites on that version, I'm closing this.