Problem with HTML Template pages breaking when they are moved in Manage Files

Options
Has anyone else seen this problem?​I moved some html files that were created from the Daylight HTML Template pages to a new folder​ in Manage Files and it broke the links to elements in the page.​We are not using the Shared Files area. Is anyone doing this and does that prevent the issue? What about anyone who has uploaded to their course area? Do you have any recommendations?​​

Answers

  • Gary.Abbott75
    Gary.Abbott75 Posts: 4
    edited November 2022

    Hi, Susan! Which elements were you observing issues with?

     

    Each of the templates does make references to elements in the "assets" folder that would have been created when you uploaded and unzipped the Daylight HTML Template ZIP package. So we'll want to make sure that the path to those referenced elements remains in tact.

  • Susan.Halick87
    Susan.Halick87 Posts: 11 🌱
    edited November 2022

    Try this:

    • Add a new file from the selected html templates to the root level.
    • Go to Manage Files
    • Create a new folder in Manage Files
    • Cut and paste the new html file from the root level to the new folder

     

    I see broken images

     

    To clarify that first item, I added the new file through Content using the "Select a Document Template" and the default path of the module was the root level.

  • Gary.Abbott75
    Gary.Abbott75 Posts: 4
    edited November 2022

    Hi, Susan. Where were the HTML Templates stored, in the same course Manage Files area or in a global files area (liked Shared Files or Organization Files)? If the templates were made local, it might be more sensitive to a moved file reference.

  • Susan.Halick87
    Susan.Halick87 Posts: 11 🌱
    edited November 2022

    They were made local. I'm exploring Shared Files on our test server before suggesting we implement this on production. Any advice on how to best use the Shared Files area for a large organization? Any gotchas to watch out for?

  • Hi Susan, I've tested this out and yes, as you've found, if you are using the HTML Templates within a course if you move it then any links to external assets will break. If you are using the standard content tool you will have the option at the point to change the path of the file, so you can specify which folder to add the file to before saving it. Please note this feature is not available in Lessons/the New Content Experience. Setting up the templates in Shared Files could help alleviate this issue. I found when I had the templates in Shared Files the links to the supporting CSS/JS and default images still worked when I moved it to a new folder via Manage Files in the Course. Please note any images or other assets added to the page and stored in the course files would still require updating if you moved the file. The main thing to be aware of with Shared Files is that users to do not have to login to access it (see the warning on this page https://documentation.brightspace.com/EN/le/manage_files/admin/about_shared_files.htm?Highlight=shared files), so make sure not to include any sensitive or confidential information in the files. Also any changes you made to the CSS, JavaScript or image files in the Shared Files would also impact any courses using the templates and referencing them.  
  • _Robin._Bloomfield85
    edited November 2022

    Hi Susan, I've tested this out and yes, as you've found, if you are using the HTML Templates within a course if you move it then any links to external assets will break.

     

    If you are using the standard content tool you will have the option at the point to change the path of the file, so you can specify which folder to add the file to before saving it. Please note this feature is not available in Lessons/the New Content Experience.

     

    Setting up the templates in Shared Files could help alleviate this issue. I found when I had the templates in Shared Files the links to the supporting CSS/JS and default images still worked when I moved it to a new folder via Manage Files in the Course.

     

    Please note any images or other assets added to the page and stored in the course files would still require updating if you moved the file.

     

    The main thing to be aware of with Shared Files is that users to do not have to login to access it (see the warning on this page https://documentation.brightspace.com/EN/le/manage_files/admin/about_shared_files.htm?Highlight=shared%20files), so make sure not to include any sensitive or confidential information in the files. Also any changes you made to the CSS, JavaScript or image files in the Shared Files would also impact any courses using the templates and referencing them.

     

     

  • Sean.Diaz44
    Sean.Diaz44 Posts: 1 🌱
    edited November 2022

    Hi @Susan Halick​ ,

     

    I've just come across this very same issue on my own and then found your question. Thank you so much for raising. I was wondering if you explored using absolute rather than relative file paths for the linked CSS files? I wanted to explore alternatives to using Shared Files which I may not get access to at my school.

     

    @_Robin _Bloomfield​ appreciate your detailed response. Is there any indication that we will be able to use the file path editor for new HTML files in the NCE Lessons? I think it would be so helpful and make this problem all but disappear, while also helping those not using templates to have some organization in their courses as they go.

     

    Sean

     

     

    Sean

  • Susan.Halick87
    Susan.Halick87 Posts: 11 🌱
    edited November 2022

    @Sean Diaz​ 

    There were some instances where a staff member did a literal copy and paste of the HTML content from one course to another and that created absolute paths. The elements in the template pages pointed to a different course and still worked. I suppose it might work if you never lost the source material in the course it is pointing to, but it sounds risky to me. We showed the person how to use select component copy to bring pieces in from one course to another and they corrected all the paths to be contained within the same course (relative links) to avoid that risk. Let me know if you try it and find a trustworthy system that works.