After moving a content between sites, bookmarks to document detail pages with the "old" sitename in the link are still working and will redirect you to show the detail page.
The sitename in the URL (for the bookmark) is not used to locate the document (the nodeRef is used for this) but to get the context of the site (like name of the site, pages configured in the site, buttons to join or leave a site, etc).
If users are using a bookmark to the "old" site but expect to be in the new site, this wrong site context can be confusing (why are you in the "old" site even so the content is located in the "new" site. And if the site does not exists at all (anymore) the context is not properly built up, buttons to join the site is displayed (but throwing an exception if trying to use it)
Steps to reproduce
1. Create a site "site1" and another one "site2"
2. Add a test document to the site1 docLib and open the document details page
3. Create a bookmark to this document details page (the URL will be similar to http://10.244.10.119:8080/share/page/site/site1/document-details?nodeRef=workspace://SpacesStore/7fc7513e-b36a-4136-aeeb-e8772c4df486
4. Move the document to site2
5. Check that the document is now in site2 and not in site1
6. Use the bookmark from step 3 to open the document details page
7. Modify the URL and replace the sitename "site1" with a non-existent name for a site like "jsfhdfskdjfh"
8. From this non-existent site context use the "Join" site button
After step 6: When using the "old" URL with the old sitename in it, Alfresco should recognize that the content has been moved and should redirect to the new location.
It would be a nice idea to inform the users that the document has been moved and that the user will be redirected the new location like "This document has been moved to site "site2". We will redirect you to this site"
After step 7: It should not be possible to open a document details page in the context of a non-existent site
After step 8: An appropriate error message stating that the site does not exist should be shown
After step 6 the context of site1 is shown even though the document is in site2
After step 7 the site context is completely messed up (missing site name, just some pages displayed, buttons to join the site are displayed)
After step 8 getting the error message "Failed to add user admin to site."