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.
When using client internal name prefixes, odd behaviour can result. As far as I can see, it appears linked to having the same first letter for the client name and the prefix.
I first noticed this with a client named 'cbpq' and a prefix of 'cl-', where the internal name started out 'cl-cbpq', it's now stuck at 'cl-bpq'.
To replicate, add a client internal name prefix (admin/hosting/client) of 'ab-', then try creating a client named 'aaaa'. The resulting client internal name will be 'ab-'!
I'm guessing there's a malformed regex somewhere in hosting_client.
Comment | File | Size | Author |
---|---|---|---|
#2 | client_internal_name_prefixes_1238588_2.patch | 757 bytes | ergonlogic |
Comments
Comment #1
ergonlogicThe problem would appear to be in hosting_client_sanitize():
ltrim appears to take a list of characters to strip as it's second parameter, rather than a string of characters.
Comment #2
ergonlogicfixed in the attached patch
Comment #3
ergonlogicAlso in my dev repo: http://drupalcode.org/sandbox/ergonlogic/1226310.git/commit/b153ffe45bca...
Comment #4
Steven Jones CreditAttribution: Steven Jones commentedThis was done by anarcat in 7.x-2.x here:
http://drupalcode.org/project/hostmaster.git/commitdiff/ae587a6b1198fab2...
So I'm not sure why he didn't merge that back into 6.x? Would that have any adverse side effects?
Comment #5
ergonlogicI suspect this was just an oversight. It looks like it does the same thing as my patch (just more elegantly).
I'll test in 6.x and report back.
Comment #6
ergonlogicYou'll also need to pull in http://drupalcode.org/project/hostmaster.git/commit/426e43dcb0d3916cd24b...
Comment #7
Steven Jones CreditAttribution: Steven Jones commentedPushed into git.