install a theme on native edx

931 views
Skip to first unread message

Andres Gomez

unread,
Sep 14, 2016, 6:24:57 PM9/14/16
to General Open edX discussion
I am sorry to ask this question because I saw it was already asked but nothing worked for me.

I am a noob in most of what I am doing so sorry in advance....

Some information:
- I have installed opendedx on my own server (ubuntu 12.04.5)  at home (native edx)
- I install  export OPENEDX_RELEASE=open-release/eucalyptus.2

Everything is fine till there...but then I wanted to install the standford theme...and it doesnt work...this is what I did....

  • - I download and unzip the them at https://github.com/Stanford-Online/edx-theme
  • - I change the name of the folder for "essai" (try in French)
  • - Upload in my server at /edx/app/edxapp/themes/essai
  • - Changed the name for _essai.scss (I also tried essai.scss)
  • - Change in the lms.envs.json 
    • USE_CUSTOM_THEME' to true, and
    • 'THEME_NAME' to 'essai'
  • Upload with
    • sudo /edx/bin/supervisorctl restart edxapp:
      sudo /edx/bin/supervisorctl restart edxapp_worker:


I also tried to change

  • "COMPREHENSIVE_THEME_DIRS": ["/edx/app/edxapp/themes/essai"],
  • ENABLE_COMPREHENSIVE_THEMING: true,
  • DEFAULT_SITE_THEME: "essai"
  • Upload with
    • sudo /edx/bin/supervisorctl restart edxapp:
      sudo /edx/bin/supervisorctl restart edxapp_worker:

None of this seem to work....


I am just trying to find a way to customize my plateform if there is a better way than the standord template (I ll take it) but I cannot event make work the standard one. Please help ( I read and tried most things propose in this forum. I don't quit get why it doesn't work...


cheers,


Message has been deleted

Дмитрий Утробин

unread,
Sep 15, 2016, 12:44:07 AM9/15/16
to General Open edX discussion
Did you change paths in scss and html files?

For example, _essai.scss:
$homepage-bg-image: url('../themes/default/images/sunrise.jpg');

change on

$homepage-bg-image: url('../themes/essai/images/sunrise.jpg');

четверг, 15 сентября 2016 г., 5:24:57 UTC+7 пользователь Andres Gomez написал:

Andres Gomez

unread,
Sep 15, 2016, 5:33:20 AM9/15/16
to General Open edX discussion

I tried but failed

This is what it looks like so far... I haven't change anything in the standford except
  • the one I mention before (changing name + scss)
  • I also change in the scss and into html but doesnt give me anything....


when I tried to inspect I have this...



<img src="/static/themes/essai/images/OpenEdXLogo.png" alt="Home Page" height="50">

Siavash Kavousi

unread,
Sep 15, 2016, 6:17:04 AM9/15/16
to General Open edX discussion
Hi Andres, 

USE_CUSTOM_THEME method is deprecated, instead do the following steps:

ENABLE_COMPREHENSIVE_THEMING = true
point COMPREHENSIVE_THEME_DIRS to the directory which contains theme (for example ["edx/app/edxapp/themes"])
then change DEFAULT_SITE_THEME to your theme name (here "essai")

and restart...

Andres Gomez

unread,
Sep 15, 2016, 8:19:56 AM9/15/16
to General Open edX discussion

I tried that but didn't work I always have a servor erros as soon as I turn it true.... I also tried to turn off USE_CUSTOM_THEME' to false, the result was the same.

abhi...@nextbig3d.com

unread,
Sep 17, 2016, 12:35:53 AM9/17/16
to General Open edX discussion
Andres,

Since you are using the latest Eucalyptus.2 release, read the instructions in the below blog (it describes to right way to do theming in eucalyptus release). Then proceed to implement the same using the github repo (2nd link). It worked for me and its up on production now.

blog : https://dehamzah.com/openedx/comprehensive-theming-on-openedx/
github : https://github.com/dehamzah/starter-theme-openedx

hope this helps.

Sincerely,
Abhilash.

abhi...@nextbig3d.com

unread,
Sep 17, 2016, 12:41:21 AM9/17/16
to General Open edX discussion
Restarting lms wont do, you need to run the paver command to update assets.

Run these commands instead of restarting

$ sudo -H -u edxapp bash
$ source /edx/app/edxapp/edxapp_env
$ cd /edx/app/edxapp/edx-platform
$ paver update_assets lms --settings=aws --debug

Juanan Pereira

unread,
Sep 17, 2016, 9:28:20 AM9/17/16
to edx-...@googlegroups.com
Hi Abhilash,

On Sat, Sep 17, 2016 at 6:35 AM, <abhi...@nextbig3d.com> wrote:
> Since you are using the latest Eucalyptus.2 release, read the instructions
> in the below blog (it describes to right way to do theming in eucalyptus
> release). Then proceed to implement the same using the github repo (2nd
> link). It worked for me and its up on production now.
> blog : https://dehamzah.com/openedx/comprehensive-theming-on-openedx/
> github : https://github.com/dehamzah/starter-theme-openedx


Great explanation, thanks! Even though it is oriented to fullstack it
also helped me to start fiddling around with themes in devstack.

I have some related questions and suggestions.

* Is there any reason for creating a themes folder in /edx/app/edxapp
instead of using the already existing
/edx/app/edxapp/edx-platform/themes ?

* After installing your starter-theme, there are some 404 errors in
the log file:
[17/Sep/2016 08:46:04] "GET
/static/starter-theme/starter-theme/images/kids.jpeg HTTP/1.1" 404
1844
[17/Sep/2016 08:46:04] "GET
/static/starter-theme/fonts/OpenSans/OpenSans-Regular-webfont.woff2
HTTP/1.1" 404 1889
[17/Sep/2016 08:46:04] "GET
/static/starter-theme/fonts/OpenSans/OpenSans-Semibold-webfont.woff2
HTTP/1.1" 404 1892
[17/Sep/2016 08:46:04] "GET
/static/starter-theme/fonts/OpenSans/OpenSans-Regular-webfont.woff
HTTP/1.1" 404 1886
[17/Sep/2016 08:46:04] "GET
/static/starter-theme/fonts/OpenSans/OpenSans-Semibold-webfont.woff
HTTP/1.1" 404 1889
[17/Sep/2016 08:46:05] "GET
/static/starter-theme/fonts/OpenSans/OpenSans-Semibold-webfont.ttf
HTTP/1.1" 404 1886
[17/Sep/2016 08:46:05] "GET
/static/starter-theme/fonts/OpenSans/OpenSans-Regular-webfont.ttf
HTTP/1.1" 404 1883

Basically, WebFonts and an image (kids.jpeg). The fonts are really
missing in your GitHub repo, but the jpeg image is there, so I suppose
that there is some linking or path issue here.

* In your article you mention that the templates/ folder should exist
at the same level that the static/ folder, but this templates/ folder
is also missing in your repo. It would be great if you could provide
it.

In order to double check that the configuration is working ok, could
it be possible to also add an screenshot of the final page with the
starter-theme template applied?

Thanks again.


--
Greetings,

Juanan Pereira

Andres Gomez

unread,
Sep 17, 2016, 12:29:44 PM9/17/16
to General Open edX discussion
Thanks so much Abhi that worked for me :)

I follow your instruction and that went well :) now I ll personalize it

Le jeudi 15 septembre 2016 00:24:57 UTC+2, Andres Gomez a écrit :I am sorry to ask this question because I saw it was already asked but nothing worked for me.

Rachid ELIDRISSI

unread,
Sep 21, 2016, 6:23:22 AM9/21/16
to General Open edX discussion
Hi Juanan,
you can find answers for your questions on dehamzah's page: https://dehamzah.com/openedx/comprehensive-theming-on-openedx/#comment-2907924702
Hope this will help,
Best regards,

Juanan Pereira

unread,
Sep 21, 2016, 7:31:09 AM9/21/16
to edx-...@googlegroups.com
Hi Rachid,

> you can find answers for your questions on dehamzah's page:
> https://dehamzah.com/openedx/comprehensive-theming-on-openedx/#comment-2907924702

Thanks for the intermediation :) The screenshot published by Abhilash
will be helpful.


--
Greetings,

Juanan Pereira

Dede Hamzah

unread,
Sep 21, 2016, 7:42:55 AM9/21/16
to General Open edX discussion
I will try to answer as best I could ya @Juanan,

Q: Is there any reason for creating a themes folder in /edx/app/edxapp?
A: The answer is no, i just follow the suggestion location privided in the documentation. Or if i think again, maybe it should be outside of edx-platform repo, to not interfere with the platform git repositories.

Q: After installing your starter-theme, there are some 404 errors in the log file
A: Did you follow the step i mention to update the assets using paver? i have been test it, and it works on eucalyptus instance fullstack. or maybe you use different stack?

Q: In your article you mention that the templates/ folder should exist at the same level that the static/ folder, but this templates/ folder is also missing in your repo.
A: Oh ya, maybe i must edit that 'should exist' word, that templates folder must exist if we want to overrides some default template OpenEdx or want to add new templates. So, in starter-theme repo, it doesn't matter because i did'nt create new templates or override something.

Q: Some Screenshot?
i already push it to the repo readme.

Reply all
Reply to author
Forward
0 new messages