Picture of Jason Wilson
Error importing images with course?
by Jason Wilson - Thursday, 1 July 2021, 10:54 PM
 

Hi guys, when importing a previously built translated course into the Adapt Author Tool (0.10.5), I'm getting error messages, and no images are displaying. The error message is:

error [02 Jul 21 08:37:22 +10:00] Framework import error. Cannot find folder: C:
\Users\jwilson\OneDrive\Work\Courses\Adapt\adapt_authoring\temp\608604f07995823a
ece82cf2\adapt_framework\courses\608604f07995823aece82cf2\608604f07995823aece82c
f2_608605927995823aece82d0d_unzipped\src\course\th-th\images


error [02 Jul 21 08:37:22 +10:00] Framework import error. Cannot find folder: C:
\Users\jwilson\OneDrive\Work\Courses\Adapt\adapt_authoring\temp\608604f07995823a
ece82cf2\adapt_framework\courses\608604f07995823aece82cf2\608604f07995823aece82c
f2_608605927995823aece82d0d_unzipped\src\course\th-th\video


error [02 Jul 21 08:37:22 +10:00] Framework import error. Cannot find folder: C:
\Users\jwilson\OneDrive\Work\Courses\Adapt\adapt_authoring\temp\608604f07995823a
ece82cf2\adapt_framework\courses\608604f07995823aece82cf2\608604f07995823aece82c
f2_608605927995823aece82d0d_unzipped\src\course\th-th\audio

From my understanding, there is no image folder at the location of the above link (or video and audio). I can see all the image files in the "src/course/th-th/assets" folder.

My question is why is this happening, and how can I fix it?

I've tried both importing the originally exported zip file, and also importing just the src and package.json file (zipped up together) - same results.

Thanks!

PS: the framework is at version 5.14.0.

I've attached screenshots of the complete code output to this post.




Picture of Chuck Lorenz
Re: Error importing images with course?
by Chuck Lorenz - Friday, 2 July 2021, 4:13 AM
 

Hi Jason,

Your statement "... no images are displaying" seems to imply that you can preview the imported course.

After importing, are you able to see the course in the dashboard?
If you can see it in the dashboard, are you able to Preview it?
If you can see it in the dashboard, are all the images appearing in Asset Management?

I'm wondering if the course is importing successfully, but you are not seeing images due to a currently unknown reason. Could the language folder "th-th" be throwing things off? So much is written with "en" as the default...

If the images are showing up in Asset Management, I think the errors are resulting from the fact that the AT "Automatically checks for the following folders if no value is entered: assets, images, video, audio." It's finding your images, etc, in the src/course/th-th/assets folder, so it reports no error. Then it automatically checks for the other folders. When it doesn't find the folder, it reports an error. 

Picture of Jason Wilson
Re: Error importing images with course?
by Jason Wilson - Saturday, 3 July 2021, 5:44 AM
 

Hi Chuck, yes I can see it in the dashboard, and also compile and run the course. When viewing the course, all image links are broken.

It's hard to say RE images in Asset Management, as I'm under the impression all assets stay in that folder as courses are built? Or are they deleted as courses are deleted out of the dashboard?

Picture of Chuck Lorenz
Re: Error importing images with course?
by Chuck Lorenz - Monday, 5 July 2021, 3:51 PM
 

I suspect that your course has been imported successfully. I recommend you focus on figuring our why the images are not displaying. Since you mentioned that the imported course was using "th-th" as the language folder, I'd try to rule out any interference from it.

See if you can find clues by checking these out:

  •  Using dev tools (F12), inspect the images with broken links. See if the "en" or "th-th" ;nag folder is a part of the src path. In this example below, my broken link is an external link, but it works the same for links to embedded assets.
  • Use dev tools to inspect the lang attribute of the HTML element. Is it "en" or "th-th"?
  • Check out the lang assigned to the course in configuration. See if either value "en" or "th-th" resolves the issue.

 

 

 

"Or are they deleted as courses are deleted out of the dashboard?" No, they indeed remain in Asset Management after a course is deleted.

Picture of Jason Wilson
Re: Error importing images with course?
by Jason Wilson - Tuesday, 6 July 2021, 4:44 AM
 

Thanks Chuck. I'll look into these when I get a chance and report back here with my findings.

Picture of Jason Wilson
Re: Error importing images with course?
by Jason Wilson - Thursday, 8 July 2021, 2:25 AM
 

Hi Chuck, I took a closer look at all you mentioned above, and they're all correct.

I looked in the asset folder for the respective course, and the folder was empty for some reason (even though everything was packed up correctly before import).

I then manually added the images to the empty assets folder, but when I force rebuilt the course the folder emptied out.

Now, I know things also happen in the "Master" folder but am unsure If I was meant to add the images there? If so, I wouldn't even know which sub-folder to start looking in, as there are so many!

Thanks again for your help on this.

 

 

Edit: After writing the above, I tried exporting the course and then manually adding the images back in (the assets folder was empty).

I then imported the course (zipped up src folder and package.json file) but the images are still not displaying.

Very weird!

 

 

Edit 2: So I decided to manually relink all images in the course from within the Author Tool. I then tested the course and all worked correctly. I then exported the course, unzipped the files, and could see the images in the "assets" folder.

I then renamed the course and zipped it up and imported it into the Auther tool. When I rebuilt the course to test, all images again are not working. I then exported this renamed course, unzipped it, and found no images in the "assets "folder.

 

 

I'm starting to think this is a bug within the Author tool. what is weird is we currently have 3 Thai courses (presuming this is language-related). This is happening to 2 of them, but the 3rd one is having no issue.

 

 

 



Picture of Chuck Lorenz
Re: Error importing images with course?
by Chuck Lorenz - Thursday, 8 July 2021, 2:45 PM
 

Hi Jason,

I'm in agreement with your suspicion that this is a bug. Search through existing issues (https://github.com/adaptlearning/adapt_authoring/issues) to see if any relate to your problem. If not,  I recommend that you create an issue. And I'd include a link to this thread in your issue.

 

You might be able to talk directly with core developers in the adapt_authoring room of gitter. Perhaps this is something they are aware of; perhaps they have a quick work around for you.

What I did that convinced me:

Summary:
I created a single demo course in the AT. I tested it with Default Language as "th-th" and then as "en". Both previewed successfully. Exports of both that were rebuilt in the framework displayed correctly. Upon reimporting each into the AT, the "en" version displayed correctly; the image in "th-th" version did not display.

Detail:

  1. In the AT I created a one-component course. I assigned an image to the Graphic component. I configured the Default Language as "th-th". I previewed the course, and the image displayed. And lang="th-th" appeared on all pages.
  2. I exported the source; extracted it; built it in the framework; and ran it. The image displayed, and lang="th-th" appeared on all pages.
  3. Next I packaged it for import and changed the name slightly to distinguish it from the original.
  4. I imported the course. lang="th-th" appeared on all pages, but the image did not display.
  5. I returned to my original course and changed the Default Language to "en". I previewed the course, and the image displayed. And lang="en" appeared on all pages.
  6. I exported the source of this EN version of the original Thai course; extracted it; built it in the framework; and ran it. The image displayed, and lang="en" appeared on all pages.
  7. Next I packaged it for import and changed the name slightly to distinguish it from the original.
  8. I imported the course. lang="en" appeared on all pages, but the image displayed.

Also when I checked that AT server files, I found the "en" image asset in
adapt_authoring\temp\60572519c4011a434c656cbf\adapt_framework\courses\60572519c4011a434c656cbf\60e7020f3a56c23f48713691\build\course\en\assets.
There was no image asset in
adapt_authoring\temp\60572519c4011a434c656cbf\adapt_framework\courses\60572519c4011a434c656cbf\60e6fe9b3a56c23f4871368b\build\course\th-th\assets

Another test:
I entered the "th-th" course (it had the image configured but was not displaying). I changed the Default Language to "en" and previewed it. The image did not display. lang="en"  appeared on the page, but the image path retained "course/th-th/assets". In the AT server files, "\build\course\th-th" was joined by "\build\course\en" but the assets folder in both remained empty.

 

 

Picture of Jason Wilson
Re: Error importing images with course?
by Jason Wilson - Wednesday, 14 July 2021, 11:38 PM
 

Hi Chuck, apologies for the late reply - I didn't see that you had replied.

Thanks for looking into this for me, and glad it's an issue and not just me, haha!

I'll add this as an issue and hopefully get a resolution soon.

Thanks again!