fix: error on course outline in Studio due to browser caching old JS file [FC-0009]#33015
Conversation
|
Thanks for the pull request, @bradenmacdonald! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
|
@bradenmacdonald 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
…file (openedx#33015) This fixes a bug where some users would see an error that prevented the course outline page in Studio from loading, for any course.
Description
This is a follow-up to #32891
This fixes a bug where some users would see an error that prevented the course outline page in Studio from loading, for any course:
Reason: When viewing a course outline on edx.org, the templates like
course_outline.underscore(which expectsenableCopyPasteUnitsto be defined) are embedded directly into the HTML on the server side, so users were definitely getting the latest version of the template which expects that variable to be defined. But the JS view code which renders the template and provides the context (hopefully includingenableCopyPasteUnits) is bundled into the filehttps://studio.edx.org/static/studio/js/factories/outline.jswhich as you can see is not a versioned URL, unlike many other JS static assets. Some users saw the page with an old (cached) version of the view code, but the new template, resulting in this error.Simply refreshing the page should also solve the bug, but we are implementing this fix anyways to reduce the impact even further so hopefully nobody else will encounter the error at all, regardless of their cache.
Supporting information
n/a
Testing instructions
Try accessing a course in Studio without the
contentstore.enable_copy_paste_unitswaffle flag defined at all, and also with it set to True.Deadline
ASAP - CAT-1 issue, although there is a workaround in place and it doesn't seem to be ongoing.
Other information