Cannot change Tutor theme for local launch!

I’m deploying OpenedX with Tutor but I can’t get my theme to work when running tutor local launch.

I works for the dev environment but when configuring with “local” the theme does not make to the running LMS container. I’m using tutor[full]==19.0.4!

Here is what I tried:

Setting the configuration before initialization:

#
# DETAILS
#
tutor config save \
  --set PLATFORM_NAME="XYZ Learning" \
  --set SITE_NAME="learning.test.mydomain.ai" \
  --set LANGUAGE_CODE="en" \
  --set BOOK_URL="" \
  --set CONTACT_EMAIL="contact@mydomain.ai"

#
# BASE URLs
#
tutor config save \
  --set LMS_HOST="learning.test.mydomain.ai" \
  --set CMS_HOST="studio.learning.test.mydomain.ai" \
  --set MFE_HOST="apps.learning.test.mydomain.ai" \
  --set LMS_BASE="learning.test.mydomain.ai" \
  --set CMS_BASE="studio.learning.test.mydomain.ai" \
  --set LMS_ROOT_URL="https://learning.test.mydomain.ai" \
  --set CMS_ROOT_URL="https://studio.learning.test.mydomain.ai"

#
## GENERAL
#
tutor config save \
  --set NPM_REGISTRY=http://registry.npmjs.org/

#
## HTTPS
#
tutor config save --set ENABLE_HTTPS=false

#
## SMTP
#
#   - https://docs.tutor.edly.io/configuration.html#smtp
#
tutor config save \
  --set RUN_SMTP=false \
  --set SMTP_HOST=smtp.server \
  --set SMTP_PORT=587 \
  --set SMTP_USERNAME="noreply@mycompany.com" \
  --set SMTP_PASSWORD="mypassword" \
  --set SMTP_USE_TLS=true

#
# THEME
#
tutor config save \
  --set COMPREHENSIVE_THEME_DIRS="/openedx/themes/xyzai"

Then

tutor config save
tutor local launch -I

Then I disable the default themes:

tutor plugins disable mfe
tutor plugins disable indigo

Then I install and enable my own theme:

pipx install --force --include-deps ./xyzai-plugin

tutor plugins enable xyzai

Looking at the themes folder at /home/username/.local/share/tutor/env/build/openedx/themes I see my theme xyzai.

After that I run:

tutor local do settheme xyzai
tutor config save
tutor images build openedx --no-cache

Once set I can see that the theme is listed on the plugins listing and it’s enabled!

Afterwards I run:

tutor local restart all

But the theme is never set. I’ve following several issues resolutions such as shown here (I can't change theme on tutor open edx - Tutor - Overhang.IO), but nothing works!

I also build my own docker image of openedx, changed it on the docker-compose.yml, but tutor local launch always reset it to the base version/setup before running :face_with_steam_from_nose:

Can someone please help me!

Hi @AlexzSouz and welcome to the community :slight_smile:

I’m not exactly 100% sure, but I think its expecting the variable to be linked to /openedx/themes and in there it will find your theme directories. Based on my understanding it’s now expecting to find your theme at /openedx/themes/xyzai/xyzai
Don’t know if this is actually causing your issue though, in theory as long as the directory structure matches then it should technically still work

As for your docker-compose modifications, local launch is expected to replace docker-compose.yml this is normal. You might want to set up your changes in a docker-compose.override.yml file as described here: Local deployment — Tutor documentation

1 Like

Tagging @arbrandes - can you help here?

1 Like

Hey there!

Completely disabling MFEs is not something Open edX supports. As a matter of fact, I’m surprised that anything worked at all after you did this.

It’s fine to disable indigo, but then you need to rebuild the MFE image via:

tutor images build mfe

Otherwise, part of theming an Open edX instance includes theming MFEs. How to do this is covered here: GitHub - overhangio/tutor-mfe: This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.

Finally, customizing the legacy frontend (any pages that are not MFEs) should be covered by this document: Changing the appearance of Open edX — Tutor documentation

It seems you’re doing what’s recommended there, but I don’t know enough about your xyzai Tutor plugin to give more specific help. Have you tried doing exactly what’s recommended in the page above, outside of a Tutor plugin?

The last thing I can think of is this:

Have you tried stopping the instance and then starting it? I think a restart doesn’t actually force the use of new images, whereas the following does:

tutor local stop
tutor local start -d
1 Like

Hi @joel.edwards, thanks for your reply. It’s really appreciated.

I did remove the COMPREHENSIVE_THEME_DIRS variable and left it to be default but didn’t solve the problem. It still won’t work on local.

Hi @arbrandes, thanks for your reply!

I’ve tried that as well but nothing seems to work :slightly_frowning_face:

I can’t recal how many times I fresh installed and configured it by now.

Thanks everyone for the help! I finally managed to properly setup it.

Best,
Alex

How do you resolve that? Please share with me and other guys