# Javascript error after updating the theme

**URL:** <https://discuss.openedx.org/t/javascript-error-after-updating-the-theme/4046>\
**Category:** Design\
**Tags:** how-to, juniper, theming\
**Created:** [January 16, 2021, 6:04pm UTC](https://discuss.openedx.org/t/javascript-error-after-updating-the-theme/4046 "2021-01-16T18:04:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandesh\_Yadav](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/sandesh_yadav/32/880_2.png) [@Sandesh\_Yadav](https://discuss.openedx.org/u/Sandesh_Yadav)\
**Post date:** [January 16, 2021, 6:04pm UTC](https://discuss.openedx.org/t/javascript-error-after-updating-the-theme/4046/1 "2021-01-16T18:04:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ARMBouhali](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/armbouhali/32/324_2.png) [@ARMBouhali](https://discuss.openedx.org/u/ARMBouhali)\
**Post date:** [January 17, 2021, 3:55pm UTC](https://discuss.openedx.org/t/javascript-error-after-updating-the-theme/4046/2 "2021-01-17T15:55:44Z")

</div>

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

```auto
# 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

```auto
/edx/bin/supervisorctl stop lms
# do your update_assets stuff here
/edx/bin/supervisorctl start lms

```
