What can cause profile folders to get duplicated after a project duplication?
The profile folders get duplicated after project duplication for example from Development to Production when Users are not synchronized between the two environments. If Development has its own users with different user IDs, when the project duplication happens the process cannot recognize the user object on the destination server since the user holds a different object ID. This said when the user first logs in to the newly duplicated project a new profile folder is created and the user will no longer have access to the old profile folder content.
Strategy detects the presence of profile folders by running certain SQL statements against the metadata. If a problem is encountered when the SQL statements are run, thus preventing profile link information from being loaded, a new profile link is created. Because a folder already exists with that user's name, and two folders cannot have the same name within the same parent folder, the new profile folder is created with a ".1" added to it.
The following is an example of a SQL statement used to see if a user has a profile folder link. If there were problems executing this SQL, a user would have a new set of profile folders created:
Sample Code/Error
SELECT a1.LINKITEM_ID, a1.OBJECT_ID, a2.OBJECT_ID
FROM DSSMDLNKITEM a1 INNER JOIN DSSMDLNKITEM a2 ON
a2.LINKITEM_ID=a1.LINKITEM_ID WHERE
a1.LINK_ID='D927FE224EC553FEAABFEEAA81A00AE4' AND a1.OBJECT_TYPE=32 AND
a1.OBJECT_ID='F3D1C0DA4D4EA4BD082C8485FA5430D7' AND
a2.LINK_ID='D927FE224EC553FEAABFEEAA81A00AE4' AND a2.OBJECT_TYPE=34 AND
a2.OBJECT_ID='54F3D26011D2896560009A8E67019608' AND
a1.PROJECT_ID='F3D1C0DA4D4EA4BD082C8485FA5430D7' ORDER BY 1 ASC
NOTES:
• LINK_ID will be unique to the project. To find the LINK_ID for the specific project, use the following SQL:
Sample Code/Error
Select OBJECT_ID from DSSMDOBJINFO where OBJECT_NAME = 'Profile Link' and OBJECT_TYPE = 52 and PROJECT_ID IN (Select OBJECT_ID where OBJECT_NAME = '{Name of the project}' and OBJECT_TYPE = 32)
• PROJECT_ID will be unique to the project. To locate the PROJECT_ID for the project, use the following SQL:
Sample Code/Error
Select OBJECT_ID from DSSMDOBJINFO where OBJECT_NAME = '{Name of the project}' and OBJECT_TYPE = 32
• OBJECT_ID will be the OBJECT_ID for the user.