Lessons cc+ import does not import content unless the file is imported twice

Description

Tested https://sakaiproject.atlassian.net/browse/SAK-47782 and everything worked fine except Lessons. Lessons does not import content unless the file is imported twice. The first time, the import just adds a new blank Lessons page. The second import of the same file then imports the content.

I repeated the test multiple times to make sure, and it fails every time on the first import.

Developer note: I made it work on the first import and added duplicate removal on later imports. See the test plan.

Attachments

6
  • 06 Mar 2025, 04:45 PM
  • 06 Mar 2025, 03:12 AM
  • 05 Mar 2025, 11:39 PM
  • 05 Mar 2025, 05:50 PM
  • 05 Mar 2025, 05:50 PM
  • 01 Mar 2025, 04:11 PM

Activity

Show:

Andrea Schmidt March 6, 2025 at 5:37 PM

Verified on 25x: https://trunk-maria.nightly.sakaiproject.org/, build: 6732b206

All tests passed and the image is present for the simple question in Lessons

Andrea Schmidt March 6, 2025 at 5:25 PM

Thanks …I realized how this is working after doing more tests. Everything has passed now through Test 4. Am now working on Test 5.

Charles R Severance March 6, 2025 at 5:17 PM

If there is an empty Lessons page in the site and a non-empty Lessons page in the archive - the imported content will “take over” the empty Lessons page and there will be no more empty Lessons page in the content. After the first import the site’s Lessons page will be non-empty and during a second import the Lessons content in the file will be ignored. In doing the duplicate removal, there is no check beyond the pages in the site and their empty / non empty status. If for example you have a site with Lessons and one page, and a file with Lessons and 100 pages, the import will not overwrite the site content and will not extend the site content - the imported content (with 100 pages) will treated as duplicate and not ignored. If you want to import content named Lessons in a file just rename Lessons in the site to something else and then the import will pull in all the content under the Lessons page. This is to avoid breaking existing content in the site by mashing together two sets of pages and leaving lots of stuff broken.

Andrea Schmidt March 6, 2025 at 5:03 PM

I believe this should not be an issue after all. If the Lessons page in the import site has a different name, or if the import file has the Lessons page named something other than “Lessons”, everything is working as expected for the quick and simple test.

Andrea Schmidt March 6, 2025 at 4:45 PM

I haven’t completed all the tests, but already found an issue.

  • If there is no content in Lessons when importing a cc+ file with Lessons content, the default Lessons page is overwritten with the content from the import and there is no “blank” Lessons page.

  • If, in a new site, content is created first and then an import is done, the Lessons page(s) from the import do not import but are discarded.

Lessons: content created before import and after import. The imported pages were rejected.

image-20250306-164442.png

25x: https://trunk-maria.nightly.sakaiproject.org/, build: 6732b206

Fixed

Details

Priority

Affects versions

Fix versions

Components

Assignee

Reporter

Environment

25x: https://trunk-maria.nightly.sakaiproject.org/, build: 292f1c3c
Created February 8, 2025 at 11:52 PM
Updated March 6, 2025 at 5:37 PM
Resolved March 6, 2025 at 1:52 AM

Flag notifications