Javascript error after updating the theme

After changing the theme of the Juniper installation, a few pages are broken. Some of the issues are as follows.

  1. The clickable stuff(for example: Expand all, Course content items etc.) are not responding to
    click.

  2. The course-content are not loading.

  3. There are a lot of JS errors in the console.

This is happening with red-theme and dark-theme as well as my custom-theme. It looks like some of the javascript files are not loading but I am not sure why.

These are the steps I followed:

First, I edited following values in the /edx/etc/lms.yml and /edx/etc/studio.yml.

“COMPREHENSIVE_THEME_DIRS”: [
“/edx/app/edxapp/edx-platform/themes”
],
“DEFAULT_SITE_THEME”: “red-theme”,

“ENABLE_COMPREHENSIVE_THEMING”: true,

Then I ran the following commands:

sudo -H -u edxapp bash
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform
paver update_assets lms --settings=production
paver update_assets cms --settings=production
exit

sudo /edx/bin/supervisorctl restart lms
sudo /edx/bin/supervisorctl restart cms
sudo /edx/bin/supervisorctl restart edxapp_worker:

I think there is some issue with the commands I am using to update the assets but don’t exactly know what is the issue. Could someone please help with this? Thank you.

1 Like

Sometimes it happens to me that some static resources are not collected correctly.
try the following commands within the edxapp venv:

# enter the edxapp venv, same as before
sudo -H -u edxapp bash
source /edx/app/edxapp/edxapp_env
cd /edx/app/edxapp/edx-platform

# collect static assets again for lms and cms
./manage.py cms collectstatic --noinput
./manage.py lms collectstatic --noinput

# feel free to exit ...

If you use an 8GB ram server, your update_assets command might finish with an error (not enought memory). As precaution I always stop lms service to free so ram then start it again once the task is finished

/edx/bin/supervisorctl stop lms
# do your update_assets stuff here
/edx/bin/supervisorctl start lms
1 Like