Bug #25422
closedCUNY.is provisioning for new users not working?
0%
Description
I saw a request for a group that I administer and looked at the user profile of the requester. I believe this is a new user. When I looked, I saw that the cuny.is link on the profile page was just cuny.is, without a personalized URL. This might mean that the regular creation of cuny.is identities, which is supposed to happen on registration (right?) is not working. Here is a link to the profile: https://commons.gc.cuny.edu/members/jeanmarc/
Updated by Boone Gorges 21 days ago
- Status changed from Assigned to Staged for Production Release
- Target version set to 2.7.10
Thanks for flagging this. It appears there was a bug in the pipeline used to create shortlinks for users when they first build their CVs. Details: When loading the 'create a CV' page (ie when a user's CV doesn't already exist), the cac-cv-editor shortlink block attempts to suggest a shorturl using the keyword_is_available() method from cac-yourls. It was attempting to do so with item type "user", which is not valid or recognized by cac-yourls; the correct param value is "profile". As such, the check was always returning an empty value. This is fixed in https://github.com/cuny-academic-commons/cac/commit/ee10188d93a66b0d2ccbe585c40da3b39286f833 and will be part of the next maintenance release.
Updated by Boone Gorges 21 days ago
To be clear, I don't believe that cuny.is accounts are created for users at the time of account creation. It may have worked like that in the past but I think it changed once we moved to the CV system. Now the URLs are requested only when the user creates a CV.
Existing users who created a CV while this bug is in place, who did not attempt to manually fix their cuny.is links, continue not to have a shortlink. The mechanism that's triggered during CV creation (namely, an empty cv-shortlink block is inserted; the editor detects that it hasn't yet been saved to the database; the cv-shortlink block runs an AJAX request to get a suggested and available shortlink based on the user's nicename; if available, it's filled into the draft post; the shortlink is then created on the initial save of the CV post) only happens for new CVs, not for updated ones.
I wrote and ran a script that identified users affected by this issue (those with a cv-shortlink block, but where the shortlink field was empty) and came up with about 1800 users. I then wrote a script that, for each of these users, asked cuny.is if the user's nicename was available as a shortlink. If so, the shortlink was created and saved to the CV. I was able to repair 1740 in this way. The few dozen that were not repairable were for various reasons: the user that created the CV is deleted and thus the CV is abandoned; the user has already requested the cuny.is shortlink for some other purpose. I have a log of these failures if we ever need it.
Updated by Boone Gorges 17 days ago
- Status changed from Staged for Production Release to Resolved