Project

General

Profile

Actions

Bug #25422

closed

CUNY.is provisioning for new users not working?

Added by Matt Gold 23 days ago. Updated 17 days ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
cuny.is
Target version:
Start date:
2026-08-19
Due date:
% Done:

0%

Estimated time:
Deployment actions:

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/

Actions #1

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.

Actions #2

Updated by Matt Gold 21 days ago

Thank you, Boone. From what you've written, it sounds like this will correct the process for generating new cuny.is links for new users when they register.

Is the process of creating cuny.is links for users who registered while there was a problem a separate issue?

Actions #3

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.

Actions #4

Updated by Matt Gold 18 days ago

Awesome. Thank you, Boone. I somehow thought the cuny.is links were created at registration -- good to know how things actually work.

Thank you for remediating the issue for the affected members. Much appreciated!!

Actions #5

Updated by Boone Gorges 17 days ago

  • Status changed from Staged for Production Release to Resolved
Actions

Also available in: Atom PDF