Resources: Site import will not update links pointing to files that exist on the target site

Description

When importing resources from one site to another and the resources include links that point to files on the same site, this relationship should be transferred to the new site. So the copy of the link points to the copy of the file, not to the file on the source site. This has been addressed in https://sakaiproject.atlassian.net/browse/SAK-50335 .
There is still a similar bug, that happens when the file the link point to already exists on the target site. See test plan for details.

Attachments

1
  • 20 Jan 2025, 12:29 AM

Activity

Show:

Andrea Schmidt February 18, 2025 at 8:41 PM

Retested today because I was working on another Jira that also used Resources and importing: 25x: https://trunk-maria.nightly.sakaiproject.org/, build: 399acb98

Test1: Import from site and the data was replaced in the import site

  • Once I deleted the URL from Resources in the import site, and selected to merge from the initial site, the URL was “imported” into the import site. (student not in initial site receives 403 error)

Test2: I then created a third site and this time did a merge first, then I deleted the link in the import site, and imported again, this time replacing my data. (student not in initial site receives 403 error)

What I noticed is that the URLs all end in the same way.

Is the issue with https%3A__trunk-mari20250218151102.URL ?

Markus Stetschnig January 21, 2025 at 1:32 PM

You are right, the links are not updated. This is failing always though and not for the just specific case “using merge” described here. There is an existing Jira only affecting 25 https://sakaiproject.atlassian.net/browse/SAK-50363 , I am not sure about 23, because https://sakaiproject.atlassian.net/browse/SAK-50335 has not been merged to 23.

Just to clarify:
https://sakaiproject.atlassian.net/browse/SAK-50335 fixed the issue and was verified on 25.
Something else broke the behavior again and https://sakaiproject.atlassian.net/browse/SAK-50363 got created.
The fix covered in this issue works for 22 currently and should work for 25 once https://sakaiproject.atlassian.net/browse/SAK-50363 is resolved.
It is unsure if the changes that broke the behavior on 25 are present on 23, because we can’t verify it until https://sakaiproject.atlassian.net/browse/SAK-50335 is merged to 23.

Andrea Schmidt January 20, 2025 at 12:29 AM

Tested on 25x: https://trunk-maria.nightly.sakaiproject.org/, build: 0a2cbd78

I created 2 sites and added students to site2. As the instructor, I uploaded a pdf file in site1, then I created a web URL and imported (with replace) in site2:

image-20250120-002802.png

The URLs are the same for both the pdf and the link. Students in site2 are able to access the pdf file, but get a 403 when trying to access the link.

Site 1:
PDF1.pdf
https://trunk-maria.nightly.sakaiproject.org/access/content/group/6b085146-4d40-43e3-a934-6b18d221c2eb/PDF1.pdf

PDF1 Link
https://trunk-maria.nightly.sakaiproject.org/access/content/group/6b085146-4d40-43e3-a934-6b18d221c2eb/https%3A__trunk-mari20250119191746.URL

Site 2:
PDF1.pdf
https://trunk-maria.nightly.sakaiproject.org/access/content/group/f2ca1ae9-6b4e-4e00-955b-1f8918b81b9e/PDF1.pdf

PDF1 Link
https://trunk-maria.nightly.sakaiproject.org/access/content/group/f2ca1ae9-6b4e-4e00-955b-1f8918b81b9e/https%3A__trunk-mari20250119191746.URL

Markus Stetschnig January 16, 2025 at 11:54 AM

This should be merged back, but traversalMap on 25 is transversalMap on 22!

Automation for Jira January 16, 2025 at 11:16 AM

A pull request has been created, "SAK-50877 Resources site import will not update links pointing to files that exist on the target site", you can see it at https://github.com/sakaiproject/sakai/pull/13201

Details

Priority

23 Status

Please Merge

22 Status

Please Merge

Components

Assignee

Reporter

Labels

Created January 16, 2025 at 10:53 AM
Updated February 18, 2025 at 8:41 PM

Flag notifications