Themes

Boost theme not working in upgraded site

 
Picture of AL Rachels
Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

I have two Moodle 3.2 sites, one built from scratch and the other an upgrade from Moodle 3.1.3+.

The Boost theme works as expected in the scratch built Moodle.

In the upgraded site, the content is there but not formatted by Boost at all. I have tried purge caches, deleted the cache and localcache folders, without fixing the problem. When I select the Boost theme, the page looks like the following partial page picture. The loading icons spin and the page never loads any layout formatting. I am looking/hoping for any suggestions that might work to fix the problem.


 
Average of ratings: Useful (1)
Picture of Richard Oelmann
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

How did you do the upgrade? Using github, or by deleting/removing the old files except config.php and replacing them with the new 3.2 ones?

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

I did a git checkout of the new MOODLE_32_STABLE branch. But I was having the same problem with all of the release candidates from the past few days.

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

I got the same just checking it out now...the styles are missing in Maintenance so looks a bit bleak.

 
Average of ratings: -
Me!
Re: Boost theme not working in upgraded site
Group Core developersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Just a tip.

SCSS compilation errors are reported in the Webserver error log. So if you are changing SCSS and suddenly your styles disappear - check the apache/IIS/nginx error log.


 
Average of ratings: Useful (2)
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi,

I have just updated my server to MOODLE_32_STABLE branch using GIT. If you have not got that branch version dated 20161205 then anything can go wrong.

I must admit I have had problems like you have described and so I suggest you wait until the OFFICIAL Moodle 3.2 is launched which should be in the next 24hours. There were four fixes that went in this last few days so the version you have may have those bugs in it!

Hope this helps?

Mary

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Mary,

I am using the same one as you mention, Moodle 3.2 (Build: 20161205), but as I mentioned to Richard I've been seeing this problem ever since I started upgrading to the release candidates over the past few days.

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

The fact you deleted the cache probably has not helped. I did than found later that it was a SCSS error that I had made when adding some styles, just a missing } curly brace was enough to sink HMS Moodle!

Mary

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

So far as I know, I have not done anything to Boost...just took a working Moodle 3.1.3+ dev site and upgraded to the first 3.2 release candidate. I then noticed the problem. Been trying various things and applying each new release candidate as it came out.  Then this morning, applied MOODLE_32_STABLE. Still not working right.

I suspect, that with all I have tried so far, and since this dev site has MANY additional plugins, I might have to delete all the code, do a fresh checkout of the latest stable branch and then start adding all the plugins back in to find out what is breaking it.  sad


 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Its happened to me now...so looks like a bug entered the system somewhere?

I'll report it as a BUG in Moodle Tracker if it's not already there!

Cheers

Mary

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Moodle Tracker reference: MDL-57263

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Al,

I have just found that I was using a child theme of Boost, and not Boost itself.  So could be a coding error on my part.

If the theme you had been using is a work in progress, then it could be the same reason it broke?

Try swapping to Clean theme by adding /theme/index.php after your moodle site URL then selecting Clean in the theme selector?

I just switched to Boost and it is working OK now.

Hopefully, on my part, this was a self made bug in the works!

Mary

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

No, I have not be working on any themes. Just trying to switch from Clean to Boost in my dev site, when the problem became apparent. Even though the pages are messed up when trying to use Boost, I can still navigate around.

I finally remembered that when I right click and select Inspect Element, that there is a Style Editor tab. It is reporting that the Style sheet could not be loaded. Now, if I can only figure out why!  thoughtful


 
Average of ratings: -
Picture of Richard Oelmann
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Just tested a fresh install of 3.1.3 and git checkout upgrade of that to 3.2 STABLE and had no problems.

Could be that the issue is either with one of the RC versions you have stepped through Al, or with one of the plugins. Unfortunately I hadn't tested an upgrade from 3.1 with an RC on my test localhost, although I have been stepping through periodically (not necessarily every update though) with git pulls ever since it was Alpha code, but that Alpha code was a direct clone of master at the time, not an upgrade from 3.1.

Sorry, I know an 'I couldn't replicate' isn't a very useful response, but maybe knowing that a clean, fresh upgrade works will help narrow down what the problem is.


Unfortunately, the downside of making use of the power of LESS or SASS is that if there is a single bug relating to the style, it crashes all of the styles, where CSS would only break that particular bit (or ignore it) - which is not a criticism of LESS/SASS, they add so much to what we can do with the styles! Its just a recognition of the facts of working with the more powerful compiled style 'languages'.

Richard

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Since it is not unusual for plugins to have style sheets, I suspect that problem is probably due to one of the many plugins I have installed, having a sheet that has something wrong with it. I have tried removing some of the ones I thought might be the guilty party, but no luck so far.

I even tried cloning a new Moodle without any plugins, dropping the config.php file in there and crossing my fingers. Moodle DID NOT like that!

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Just noted a problem. My site where Boost works, also reports that Style sheet could not be loaded, but does have some differences. angry


 
Average of ratings: -
Picture of Richard Oelmann
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

I think its the 'all' one that makes the difference Al - the fact its there on your working site (6 down on the left of your image) means the processed theme styles are in place, and the fact its not there on the one that doesn't work shows that none of the SCSS styles are being processed.

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Yep! It's that 4,753 number that makes me think it is one of the style sheets from one of the plugins. Both sites have about the same number and type of plugins with just a few differences.

What really bugs me now is that I can't get a new copy of the code, without all the plugins, to run at all. Something about filters.


 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Oh, it is still broke after adding in missing filters to the new code. sad

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Just reporting that my test site if OK now...it was the theme I had been working on. I thought I had deleted the renderer that I had added from Boost but was still there so after removing that it is working fine now.

I suppose it is difficult to pinpoint, but I have noticed recently if you make a small mistake when adding any SCSS it breaks the theme and you get the page as you have shown in your screenshot Al.

I suppose this could be true then of any code that is wrong or missing.

It's a pain...

Sorry I can't be more help.

Mary

 
Average of ratings: -
Picture of Helen Foster
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developersGroup TestersGroup Translators

Just noting that the problem of the theme breaking if you make a mistake when entering SCSS has been reported as MDL-56488.

 
Average of ratings: -
Picture of Ger Tielemans
Re: Boost theme not working in test 3.3 site
 

Theme Boost also breaks in my 3.3 test site. It seems to be an issue in some module plugins, for example offlinequiz.

Also this warning, even when Boost theme is ok:


  • line 228 of \lib\blocklib.php: call to block_base->user_can_addto()
  • line 3772 of \lib\navigationlib.php: call to block_manager->get_addable_blocks()
  • line 768 of \lib\pagelib.php: call to flat_navigation->initialise()
  • line 817 of \lib\pagelib.php: call to moodle_page->magic_get_flatnav()
  • line 54 of \theme\boost\layout\columns2.php: call to moodle_page->__get()
  • line 1110 of \lib\outputrenderers.php: call to include()
  • line 1040 of \lib\outputrenderers.php: call to core_renderer->render_page_layout()
  • line 164 of \my\index.php: call to core_renderer->header()

 
Average of ratings: -
Picture of Rick Jerz
Re: Boost theme not working in upgraded site
Group Particularly helpful Moodlers

Al, I have had these same problems.  I have concluded that the overall CSS is not kicking in.  

I see that I am into this discussion a little later than everyone else.

When I installed my 3.2dev into MAMP, I had these same problem.  But as I tried things, such as clearing the cache, switching to CLEAN, switching back, etc., (can't say exactly what) all of a sudden Boost would kick in and work.  Then, as I would add some CSS or variable to Boost's theme, the overall CSS wouldn't work and I would get what you get.  Once again, doing this and that would fix it.

I could never figure out what was fixing it.

On my VPS, I have had some, but not as many, similar experiences.  I thought that I was the only one, but now I see that I am not alone.

I am encouraged that it may just be something with 3.2dev.

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Thanks for the help everyone. I am done for the day here and will leave it until tomorrow. sleepy

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Al, Rick & Richard,

I have just finished upgrading from Moodle 3.0.6 to Moodle 3.2.0 and for a few minutes while the database was being added to and upgraded all was well, then ping and the page display went and so the display although still in order, looked nothing like it should have, the design and colours and font styles had gone. Then I noticed a reload button at the bottom of the page and and so I clicked it. Now that fixed the page view and everything after that ran smoothly.

So there is a pause in the upgrade when it moves from the theme you are using, in my case Morecandy, and then it jumps to the Default theme, in this case Boost. So it seems to me to be that transition that messes up. So if you were using an old theme like Afterburner whose parent is Base theme, for instance, and since Base theme is removed by default in 3.2, then heaven only knows what happens after that! I hope there are some instructions for sites in that position?

All done here too...good night everyone.

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Mary and all others,

Thanks everyone for all helpful suggestions. Fortunately, I have just now discovered what was causing Boost to break in my upgraded site. I did it by adding copies of all the additional installed plugins from the broke site into the site I used for Moodle 3.2 QA Testing. Unfortunately, it is a plugin, MooTyper, that I maintain. I have been so busy with QA testing for Moodle 3.2 that I haven't yet made sure it is ready for use. Obviously, something will have to be "fixed" before MooTyper is ready for Moodle 3.2 when using the Boost theme.

Thanks again,

AL

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Just a follow up on the final cause of why Boost did not work in my upgraded site with MooTyper. There was ONE misspelled word in the MooTyper styles.css file. Finally found the error by erasing the contents of the file, adding each section of the css back in one at a time, then purging all caches until things broke. Once I checked the bad section line by line, I finally found the problem as shown in the pictures.

Was this:

Should have been this:


 
Average of ratings: Useful (2)
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Al,

Thank you for explaining the problems you encountered, together with the fixes for your site.

MDL-57319 seems to be fixing something in core too that will hopefully help with the problem as a whole.

Cheers

Mary

 
Average of ratings: -
Dan at desk in Moodle HQ, Perth
Re: Boost theme not working in upgraded site
Group Core developersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

MDL-57319 seems to be fixing something in core too that will hopefully help with the problem as a whole.

Actually the typo sounds more like it will be fixed by MDL-56488 (although i'm not sure how to reproduce it)

 
Average of ratings: -
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Dan,

Thanks for the info. After reading the tacker for both, I think it was probably the second one, MDL-56488, that was my problem.

Of course, now that I have that part working, I have other size and location errors to track down. thoughtful

 
Average of ratings: -
Richard Samson
Re: Boost theme not working in upgraded site
 

Some time has passed since this thread was active but I can't find any more references to this problem.

Yesterday I did a clean install of Moodle 3.0.1+ on a shared hosting platform.

Then I upgraded to Moodle 3.2.1+ by unzipping the program locally, renaming the Moodle folder on the server, uploading the local Moodle folder, renaming it appropriately and copying the config.php file from my 3.0.1+ installation into the 3.2.1+ folder on the server.

I then went through the remaining upgrade dialogues without problems.

But the Boost them is broken, in a very similar way to how you have described previously.

Here's a screen capture:

Boost broken 

The More theme is similarly broken but if I select the Clean theme the new installation works fine.

Can any of you experts tell me what I should do to get this working or point me in the right direction?

As I have said, this is a clean install and upgrade.

Thanks.


 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

No...its your php.ini time out setting (sorry I forget what it's called) needs changing from 60 seconds to 300 seconds as Boost takes a while to load.

 
Average of ratings: Useful (1)
Richard Samson
Re: Boost theme not working in upgraded site
 

Wow!

Thanks, Mary!

That worked.

Just great. That's made my day.

smile



 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Glad it worked!

Cheers

 
Average of ratings: -
Picture of Dimitar Ivanov
Re: Boost theme not working in upgraded site
 

Have you tried enabling "Theme designer mode"?

Site Administration > Appearance > Themes > Theme settings


That way you will have the CSS files included separately, which would hopefully help you find out where it breaks.



 
Average of ratings: Useful (2)
Picture of AL Rachels
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Dimitar,

Thanks for the suggestion, I've tried so many things over the past 30 hours, that I can't remember for sure if I tried that or not.

Anyway, my wife is calling me to eat, so I will try that tomorrow.

AL

 
Average of ratings: -
Picture of Patrício dos Santos
Re: Boost theme not working in upgraded site
 

Thank you Dimitar!

This helped me to figure out what was broken. 

Enabling designer mode I was able to see to that the mod_reader is causing the theme boost to broke



 
Average of ratings: -
Picture of Bob Gilmore
Re: Boost theme not working in upgraded site
 

I'm also experiencing this issue on a completely new install. I pulled the stable 32 branch from git, ran the install process and ended up with a screen identical to the OP.

I can get it to work by turning on the theme developer mode. With that mode off, the cached "all" style doesn't load.

I'm not seeing any php errors and everything seems to work fine in clean, so it's as if the SASS isn't compiling correctly.

Ive run out of ideas for testing myself, so would appreciate any advice.

Cheers!

 
Average of ratings: -
Me!
Re: Boost theme not working in upgraded site
Group Core developersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

If it works with themedesigner mode on, and doesn't work when it is off - I guess you have a bad stylesheet cached in your browser. Try turning theme designer mode on, purging the moodle caches and force refreshing the page (ctrl/shift refresh or something).

 
Average of ratings: Useful (1)
Picture of Bob Gilmore
Re: Boost theme not working in upgraded site
 

Thanks for your reply!

I've pretty much tried everything I can think of in that regard. Cache clearing (moodle and client), different browsers, different machines, different networks.

The server in question is running on a Centos7 machine, php 7.0.13, Maria 5.5.50. I was wondering if it might be a permission problem with SELinux, but disabling that made no difference either.



 
Average of ratings: -
Picture of Bob Gilmore
Re: Boost theme not working in upgraded site
 

Well, I got my issue sorted. The execution time on my testing server was 30 seconds which apparently wasn't enough for the first run of the theme with caches cleared.

It's not an especially well resourced server so hopefully this wont be an issue on our production server, but hopefully this might help others.

 
Average of ratings: Useful (4)
Picture of Frank Jara
Re: Boost theme not working in upgraded site
 

Yup, updating the php.ini file from max_execution_time = 30 to max_execution_time = 200 fixed my issue. 


 
Average of ratings: Useful (2)
Dan at desk in Moodle HQ, Perth
Re: Boost theme not working in upgraded site
Group Core developersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

I have created MDL-57319 to fix this (and sent a fix for peer review)

 
Average of ratings: -
Picture of Elliott Benzle
Re: Boost theme not working in upgraded site
 

Yes!

Changing the max_execution_time worked for me also. Thanks.

 
Average of ratings: -
Dan at desk in Moodle HQ, Perth
Re: Boost theme not working in upgraded site
Group Core developersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Changing the max_execution_time worked for me also. Thanks.

Which version are you using? MDL-57319 was fixed a long time ago now, and should make this unnecessary.

 
Average of ratings: -
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

Hi Dan,

Just to say you may like to look at another feed because the max_execution_time did not work for me on 3.2.3 or 3.3.

Apparently the bug is in awesome font compilation. Until I did this 3.2.3 worked but at times was a little flakey but 3.3 would not work at all until I used the workaround. Hope useful. Understand has not been fixed yet talking of 3.4!

The workaround to get Boost or child theme based on Boost to work is

Moodle in English » Forums » Themes » Boost theme not working in upgraded site

Picture of Richard Oelmann

Re: Boost theme not working in upgraded site

by Richard Oelmann - Monday, May 22, 2017, 5:01 PM

 

There appear to be two interrelated issues

https://moodle.org/mod/forum/discuss.php?d=352475

The sass csstreepostprocessor is far too slow (as identified by Urs in the above thread) and in https://tracker.moodle.org/browse/MDL-58646 and this appears to have become even worse by adding the fontawesome stuff as sass too.

A suggested work around, if you are not having to support browsers that require vendor prefixes (and so probably don't need the csstreepostprocessor anyway) is to change the line in config

$THEME->csstreepostprocessor = 'theme_boost_css_tree_post_processor';
$THEME->csstreepostprocessor = null;

Richard

Show parent | Reply

See this post in context


 
Average of ratings: -
Picture of Paul Verrall
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writers

Hi all,

I've run into this a few times as my site runs on super slow hardware it's particularly sensitive to resource intensive bugs ;)

My workaround is to run the SCSS compile in a CLI script after an upgrade. I've detailed how I do this here: 

Hope that helps!

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Paul,

Thanks for sharing your solution as I am sure it may help others going through the same problems. And as I am also sure you are aware, it seems to be more to do with caches than anything and how different systems are coping with it, or not as the case may be.

The good news is that the Moodle Developers are very much aware of the problem and doing all they can to find a solution that helps everyone.

Thanks

Mary

 
Average of ratings: Useful (1)
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Here is the Moodle Tracker that has been set up to track the problem.

MDL-58646

 
Average of ratings: Useful (1)
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

Mary Thank you

Still a problem for me but can get 3.3 running with the work around.

Use the same fix on 3.2.3 to make it more stable on my production system.


Interesting when I saved this post, Moodle for a second went to html page.

 
Average of ratings: -
Picture of Paul Verrall
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writers

Looks like we are now going to get a CLI option in a future release :D 

See: MDL-59123

 
Average of ratings: -
Brian
Re: Boost theme not working in upgraded site
Group Particularly helpful Moodlers

FYi the command to rebuild css via clis is:


    `php /moodle/admin/cli/build_theme_css.php`


where substitute /moodle for the correct directory structure on your server


and `--verbose` if you have issues


 
Average of ratings: Useful (1)
Picture of David Lowe
Re: Boost theme not working in upgraded site
 

I've been working on a new theme in which I cloned the boost theme and renamed the needed lines of code and files and was soon ready to start customizing. I haven't really used SASS that much as I'm quite content using plain ol css so I decided to try and commit to using SASS as Moodle seems to be pushing this.....I think?. As soon as you turn on the designer mode SASS recompile's everytime taking 2+ minutes all to end up timing out, due to php timing out, followed by a few more refreshes. I then turned it off and tried purging caches via CLI and it's the same result of waiting for a few minutes just to get a page with no CSS at all, exactly like the image you posted.

I'm sorry but this is horribly inefficient when it comes to making theme changes. If I make one little css change in my sass file I then have to wait a few minutes only to refresh again, wait another 30 seconds and refresh one more time. I spent a few hours just trying to change a couple things and decided to quit using sass. 

Perhaps I'm missing something to speed this process up??

I cannot have this on production. There are times when I have to purge caches as other mods/blocks/plugins have javascript or css changes. And on the occasional time something just weird is happening and caches need to be purged mid day (don't like to do this but sometimes it has to be done). If this happens on production then thousands of students are gonna hit a page with no css and we'll get a flood of emails and tickets complaining moodle is broken.  Only cause SASS is taking it's sweet time recompiling. 

Again, maybe I'm missing something to speed this process up??

HOW TO FIX: So my work around was to simply grab the all.css file in your moodle data directory:

   moodle_data/localcache/theme/[some number here]/[name of your theme]/css/all.css

and stick that in the style folder: 

   theme/[your theme]/style/all.css

Remove all references to scss in the theme/[your theme]/config.php and now add all.css to your sheets array.

$THEME->sheets = array('all')

// $THEME->scss = function($theme) {

//     return theme_uleth_get_main_scss_content($theme);

// };

// $THEME->csstreepostprocessor = 'theme_uleth_css_tree_post_processor';

etc.....


At least this way while scss is disabled you can quickly make theme changes and be able purge caches and see the results almost instantly.


Perhaps if you really want to turn scss back on once your done styling you can reverse the process above and include your new changes in either a sass file or add it to the $THEME->sheets array.

HTH.

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi,

Have you got Theme Designer Mode switched on? As that can really slow things down.

You can alter your PHP.ini file to add more time onto the file loading time, which by default is set to 60 seconds. I think adding -1 makes it limitless.

Other than that we are all experiencing problems the are causing us some frustration with Moodle 3.2..so you are not alone.

Stick with Bootstapbase themes, Clean or More if you are on a production site.

Cheers

Mary

 
Average of ratings: Useful (1)
Picture of Adam Jenkins
Re: Boost theme not working in upgraded site
Group Particularly helpful MoodlersGroup Plugin developers

I am having the same problem here. I have two sites running on the same server; one works with Boost and the other doesn't. The one that doesn't has a few more plugins installed but other than that, they're essentially identical configurations.

On the one that works, "all" loads correctly with 5208 rules. In the broken one "all shows 0 rules.

The kicker is that the broken one works in Theme Designer Mode. However the moment I turn Theme Designer mode off, the "all" rules vanish.

All the tracker issues I've seen appear to be "closed" or "not a bug"... With so many people having such similar buggy experiences, how is this NOT a bug? If Boost is so fragile, it becomes unusable -- this may not be a "bug" but surely it is not a "closed" issue.

 
Average of ratings: -
Mt. Fuji
Re: Boost theme not working in upgraded site
Group Particularly helpful Moodlers

Adam,

How are things? Looks like I've run into the same issue as many here and it wasn't related to max_execution_time. In my case I had some modules installed that apparently had bad CSS somewhere that was breaking everything...which seems a bit odd...that a mod could so horrendously break everything.

Anyway, I deleted all non-core mods and got everything looking the way it should. Now I just have to put them back in one at a time to find the culprit.

Maybe you've already worked around this?

Jason

P.S. Good seeing you at the Moot last month. smile

 
Average of ratings: Useful (1)
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Upgrade to Moodle version 3.2.2 should fix it. I 

 
Average of ratings: Useful (1)
Picture of Adam Jenkins
Re: Boost theme not working in upgraded site
Group Particularly helpful MoodlersGroup Plugin developers

Hi Mary,

I'm on Moodle 3.2.2 and checking for updates yields nothing but the friendly message:

Your Moodle code is up-to-date!

Not so much as an out of date plugin. Hence, I'm still scratching my head.

Cheers!

 
Average of ratings: -
Gareth J Barnard
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developers

Hi David,

Interesting but dangerous fix as 'all' contains ALL of the CSS including the plugins, so therefore when applying your fix you'll then be serving the plugin CSS twice.  This is because the plugin CSS will be added to the theme CSS which is now 'all.css'.

Therefore a better solution would be to use pre-compilation of the theme SCSS with Grunt, say with: https://github.com/gruntjs/grunt-contrib-sass - as other themes such as Essential do with LESS.

Cheers,

Gareth

 
Average of ratings: Useful (1)
Picture of David Lowe
Re: Boost theme not working in upgraded site
 

Hmmmm....yes good point. At least for now I can turn on designer mode and build my custom theme without waiting for SASS to recompile over and over. It'd be nice if this theme or even Moodle in general had the option to not purge core SASS and only plugins or maybe only theme.....? Anyways, some form of flexibility would be nice.

Maybe there is and I'm just missing it, will have to dig a little deeper........

Thanks for the feedback smile

 
Average of ratings: Useful (1)
Picture of David Lowe
Re: Boost theme not working in upgraded site
 

Took your advice Gareth and thought I'd give an update that works swimmingly for me and maybe this will be helpful for others as well. I'm still not convinced to use SASS when it comes to editing and changing your theme, plugins, blocks, etc. and especially if you have to purge caches on production only to bog down your server waiting for SASS to recomplile. 

In case anyone want's to try here are the steps:

Step 1: Let's use Grunt to compile the SASS. Navigate to your moodle root level and install sass to work with grunt:

  1. npm install grunt-contrib-sass --save-dev
  2. Now add it to the Gruntfile.js, I put it under grunt-contrib-watch (near the bottom)
  • grunt.loadNpmTasks('grunt-contrib-sass');
let's add the command line to execute it. inside grunt.initConfig let's add sass:

grunt.initConfig({

           ....

        sass: {

                dist: {

                    options: {

                        style: 'expanded'

                    },

                    files: {

                        // include font-awesome

                        font-awesome.scss',

                        // pick the preset your using

                        'theme/my_boost_clone/style/name_this_to_whatever.css': 'theme/my_boost_clone/scss/preset/default.scss'

                        // this will compile sass and create one css file that will be ready for uglification

                    }

                }

            },

        ....


    });


    d) now run grunt using: 'grunt sass' (no quotes) in the terminal. You may have to uglify it for production use, depending on your stack and what other tools you use. This will create a compiled file in your styles folder.


Step 2: In your my_boost_clone/config.php comment out anything sass and add your 


    a)  // $THEME->scss = function($theme) {

        //     return theme_uleth_get_main_scss_content($theme);

        // };

        // $THEME->csstreepostprocessor = 'theme_uleth_css_tree_post_processor';

        // $THEME->extrascsscallback = 'theme_uleth_get_extra_scss';

        // $THEME->prescsscallback = 'theme_uleth_get_pre_scss';

    b) Add the compiled css to your theme:

        $THEME->sheets = array('name_this_to_whatever'); // this is the compile css file


Now you can make changes without ever having to wait for SASS to recompile. If anyone tries this and your stuck or it seems I might have missed something let me know and I can assist.

Hope this helps........

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

We have recently discovered that there is a problem with some server set ups, which are affecting the way Moodle processes LESS and SCSS in Moodle 3.3

Please see MDL-59188 for more information.

 
Average of ratings: -
Picture of Hynek Černoch
Re: Boost theme not working in upgraded site
 

Another cause with the same symptoms is exhausted "memory_limit". The minimal necessary value for my site is 160 MB, to render a request "/theme/styles.php?/boost/123.../all", otherwise the php css parser fails on memory allocation every times if the result is not cached. (moodle/lib/php-css-parser/Parser.php) It can not be cached until it succeeds once.

Unfortunately, the setting "Debugging / Debug messages" was NONE and nothing has been found in error_log. It was also very complicated to search and understand anything in administration settings without css. I think that "Debug messages" should be increased during upgrade or maintenance mode at least to level "MINIMAL: Show only fatal errors", because it is terrible to find and increase it through site administration after failed upgrade.

To recapitulation of this long thread: There are three known causes of the same symptoms: 1: invalid css, 2: short max_execution_time , 3: low memory_limit. It is trivial to differentiate them with fatal error reporting, but without this - we can only guess. Maybe removing some modules helped other people (above) not because there was every times something invalid is the css, but also because memory and time requirements decreased by less modules.

 
Average of ratings: Useful (1)
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi.

With respect to your comment regarding
1. Invalid CSS (should really be SCSS)

This problem is fixed in Moodle 3.2, which means that any errors in SCSS are rejected and not allowed to proceed, until they are fixed or removed.

Mary

 
Average of ratings: -
Picture of Sergio Renato Aldana Alvarez
Re: Boost theme not working in upgraded site
 

I have a clean 3.2.2 installation, after that I have installed Offline Quizzes plugin I have found this issue

 
Average of ratings: -
Picture of Mihir J
Re: Boost theme not working in upgraded site
 

I think Moodle 3.3 release - 15 May 2017 - we are facing similar issue.


all - style is taking approx 3-4 minutes to load.. i have checked in boost theme, clean installation, no courses, just 2 users, in my localhost.

Increase execution time and memory limit, doesn't solve. 'Clean' theme works just fine.

Anybody has any idea about it. 

thanks again!

 
Average of ratings: -
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

I have the same problem on a clean install for Moodle 3.3 - I have increased - max_execution_time to 300 - increased max_input_time to 200 and increased memory to 200M

Clean will work OK but Boost gives the text pages as above.


This has always been a slight problem and when upgrade my 3.2.2 production system to 3.2.3+ series I get a similar problem but will correct itself.


running out of options for 3.3 any suggestion?


Server spec is


Server Name     vps
cPanel Version     64.0 (build 22)
Apache Version     2.2.31
PHP Version     5.6.28
MySQL Version     5.6.35
Architecture     x86_64
Operating System     linux

 
Average of ratings: -
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

Update - Boost is still the problem - using defaut.scss or plan crashes system to text. The only way I get 3.3 working is using either Clean or More themes.

Created new course just a basic course OK on Clean or More but crashes on Boost - have tried other scss but gives same result.

Remember this was a clean install and using 3.3 out of the box.

On 3.2.3+ Boost works but occasionally has the same problem when upgrading but does work but does work.

Pointers and suggestions would be welcome - have already done all the suggestions to php.ini


 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi John,

When you say "...using default.scss or plan..."  what do you mean exactly?

If you are adding some SCSS then where are you adding this markup?

If you are adding this in the RAW SCSS (2nd box) in the Boost's Advanced settings then have you tried validating it first using an online SCSS valididator?

Just a thought,

Mary

 
Average of ratings: -
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

Hi Mary

Thank you. What I meant was that I am taking Boost as it is - not changing or working on anything.

The default.scss that comes with Boost - have not made any changes to it.  Again have not validated as it is out of the box so should work and is a complied scss file? Not adding anything in Raw scss.

Again a puzzle.

On 3.2.3 I run a Boost based theme produced by a Moodle partner. Boost has intermittent problems of the type I am talking about but you can clear it - thankfully as this is a production system.

I have spent hours with the Moodle Partner trying to solve this one. I believe they also have an issue with 3.3 and Boost.

Thanks - if you have any further thoughts.

The phi.ini I changed in WHM at root and this changes the Apache file as far as I am aware. The changes were.


max_execution_time = 300

;was 90

max_input_time = 200

;was 60

max_input_vars = 1000

;not changed

memory_limit = 200M

;was 128M

So should be OK.

Any more thoughts?

Thanks

John


 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Yes...

I changed both the PHP and Apache php.ini files

Not sure if this is the same on all servers. as I am currenlty using a WAMP3 serve on my Windows PC.

Apparently the problem stems from the way Boost compiles the SCSS, but not all site are affected so it could be as you say a VPS issue.

I'll check and and see if anyone has reported this in the Moodle Tracker.

Thanks

Mary

 
Average of ratings: -
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

On windows is different. I know by alter like upload file size the way I do works fine so I know I am updating the Apache php.ini

The alteration I made have improved the error for 3.2.3 (Slightly)

I had  look on tracker could not find anything and when I raised on a thread suggested it was not a bug associated with my problem and I should post on this community.

It will be interesting if you find anything on tracker I maybe using the wrong search string smile

Thanks again

John

 
Average of ratings: -
Picture of Velani Diz
Re: Boost theme not working in upgraded site
 

I have the same issue here and I feel a bit lost since it's the first time I'm using Moodle.


I've already tried to increase max_execution_time in php.ini, but Boost still crashes.

I haven't touched any css. I have no idea how to do it, anyway.

Theme Clean works fine.


I have absolutely no content on my Moodle page, so any thoughts on how to fix this are welcome.

If anything goes super wrong, I can simply delete everything and re-install Moodle 3.3.


Does anyone have any idea on it?

Thank you all for the attention!

Velani 

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi, 

What value did you change it to?

Did you also change the php.ini in Apache too.

Thanks

Mary

 
Average of ratings: -
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

Hi Mary,

See reply above.

My personal opinion and feeling is there is a bug in Boost which affect certain server configurations. Maybe just VPS users?

Just thought.

Thanks

John

 
Average of ratings: -
Picture of Velani Diz
Re: Boost theme not working in upgraded site
 

Hi Mary, 

I've changed max_execution_time to 300. 

The php.ini file I changed was the one in the root folder (before public_html).

I don't know how to change anything in Apache. Where should I look for it? ._.

Thanks!!

Velani


 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Velani,

This all depends on if you have access to your Server. Most Host companies allow acces to the php.ini file but I am not sure about the Apache copy of that file.

If your site is hosted then it would make sense to contact them and ask if they can help?

I am really at a loss with all of this, as it seems that is is not being fully addressed by Moodle.

Mary

 
Average of ratings: Useful (1)
Picture of Velani Diz
Re: Boost theme not working in upgraded site
 

Hi Mary, 

I guess the company that hosts might help me and I think I'll contact them.

If that doesn't work, I'll probably just try to downgrade Moodle or reinstall and see what happens.

Once again, thank you for your patience!

Velani

 
Average of ratings: -
Picture of Mihir J
Re: Boost theme not working in upgraded site
 

Hi Mary

I think it is not about the vps or server. I have tested in windows, wamp 3 , linux..by changing several configuration in php.ini and apache 

Boost in 3.3 have some problem i think it is scss compilation.

One more thing I have observed that if i just comment out the font awesome from boost, it works fine

Similarly any child theme made from boost in 3.3 also have similar issue. I rememember there was a tracker created for this with title of purge cache taking lot of time. So after purge cache is done, boost is trying to recompile and it takes approx 3-4 minutes even on a plain site.

thanks!

Mihir

 
Average of ratings: -
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

Hi Mihir

 I have just done as you suggested and Boost works - commented out awesome font.

3.2.3 does not have awesome so that why perhaps it works.

Will check out my child theme.

One step forward - Great

Thanks

John

 
Average of ratings: -
Picture of Richard Oelmann
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

There appear to be two interrelated issues

https://moodle.org/mod/forum/discuss.php?d=352475

The sass csstreepostprocessor is far too slow (as identified by Urs in the above thread) and in https://tracker.moodle.org/browse/MDL-58646 and this appears to have become even worse by adding the fontawesome stuff as sass too.

A suggested work around, if you are not having to support browsers that require vendor prefixes (and so probably don't need the csstreepostprocessor anyway) is to change the line in config

$THEME->csstreepostprocessor = 'theme_boost_css_tree_post_processor';
$THEME->csstreepostprocessor = null;
Richard
 
Average of ratings: Useful (2)
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

Hi Richard,

Thank you for the work around - yes that works.

On 3.3 I can now use my child theme based on boost.

I am now testing on my dev site on 3.2.3 as this has always had some problems

Not certain what the long term fix will be and when.

Thank you.

John

 
Average of ratings: -
Picture of Emma Richardson
Re: Boost theme not working in upgraded site
Group Documentation writersGroup Particularly helpful Moodlers

Thank you for this.  I am trying to get two sites ready to switch to 3.3 and Boost based theme and have been fighting this like crazy.  

 
Average of ratings: -
I Teach With Moodle
Re: Boost theme not working in upgraded site
Group Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Richard, 

Thanks for the tip. It did not work for me, but it was worth a try. I am at a bit of a loss, however as my Boost them still does not work (pages are un-styled). I have raised max_execution_time to 300 seconds, memory_limit to 1000MB, updated Moodle to 3.2.3 (20170608), which contains the 'sabberworm' fix - nothing has worked so far. Hardware is definitely not the issue, as the server is far more powerful than it needs to be (64GB RAM, Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz 16 cores) for a relatively small school. PHP 5.6.27 on Debian Jessie 8.4. All of the server requirements show up as 'OK' in the admin/environment.php page.

I get the below in my error.log file.

[Fri Jun 09 22:00:xxxx 2017] [:error] [pid xxx] [client xxxx] Default exception handler: Exception - Unopened { [line no: 9835] Debug: \nError code: generalexceptionmessage\n* line 133 of /lib/php-css-parser/Parser.php: Sabberworm\\CSS\\Parsing\\SourceException thrown\n* line 96 of /lib/php-css-parser/Parser.php: call to Sabberworm\\CSS\\Parser->parseListItem()\n* line 87 of /lib/php-css-parser/Parser.php: call to Sabberworm\\CSS\\Parser->parseList()\n* line 82 of /lib/php-css-parser/Parser.php: call to Sabberworm\\CSS\\Parser->parseDocument()\n* line 1589 of /lib/outputlib.php: call to Sabberworm\\CSS\\Parser->parse()\n* line 899 of /lib/outputlib.php: call to theme_config->post_process()\n* line 171 of /theme/styles.php: call to theme_config->get_css_content()\n, referer: https://moodle.edu/?theme=boost

Does anyone have the same issue? Or does anyone know how I could fix this? 

Any help would be appreciated

Cheers, 

Fred

 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Fred,

I am not really sure if it is relevant but I noticed the parser file name has a capital letter Parser.php

I was under the impression that Moodle only allows lowercase letters in file names.

But I may be wrong?

Cheers

Mary

 
Average of ratings: -
I Teach With Moodle
Re: Boost theme not working in upgraded site
Group Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Mary, 

Thank you for the help. I believe the CSS Parser is a third-party library so the Moodle rules may not be followed. I wish I could upgrade to PHP7, but I am unable to do so, both in my staging server and development server. Will keep this thread updated if/when I find a solution to this issue. 

Cheers, 

Fred

 
Average of ratings: -
I Teach With Moodle
Re: Boost theme not working in upgraded site
Group Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi,

This is actually related to a third-party plugin with a typo in a styles.css file (mod_reader line 145). I have Moodle 3.2.3+ (20170519) installed, which I thought could deal with these types of issues and not prevent compiling. In my case, it did not. I will have to investigate further as to why this is happening. 

Cheers, 

Fred

 
Average of ratings: -
Picture of Gordon Bateson
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Translators

Hi everybody,

Sorry to hear that the styles.css in the Reader module seems to be the focus of attention for all the wrong reasons wide eyes

Interestingly, my Moodle 3.2.3+ site includes the Reader module, and displays the Boost theme without any problems, so I'm not entirely convinced the Reader module is the cause of this particular issue.

FYI, the reason that for the asterisk line in the CSS file is to mimic inline-blocks in IE7.
The original idea came from the following page:

Perhaps we don't need to worry about IE7 anymore?

 
Average of ratings: -
Picture of Gordon Bateson
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Translators

According to the following page, the minimum IE requirement for Moodle 2.8 is IE9 ...

... so it is probably safe to simply remove that asterisk line from the css file. I will do that later today.

Thanks for bringing this issue to my attention.

Best regards
Gordon

 
Average of ratings: -
Picture of Gordon Bateson
Re: Boost theme not working in upgraded site
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Translators

I have disabled the lines form the Reader module's CSS file that are specific to IE6/7.

Please arrange for the Reader module on your Moodle site to be updated at the next convenient opportunity.

Best regards
Gordon  

 
Average of ratings: -
Picture of Mihir J
Re: Boost theme not working in upgraded site
 

I have checked today, i do not have a reader module installed, still the same problem.

I have used latest Moodle 3.3 released from https://download.moodle.org/releases/latest/

It is still an issue

thanks!

Mihir

 
Average of ratings: -
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

I am still having the same problem unless I rem out the following statement in the Boost config file. and add the new line. (as recommended by Richard Oelmann)

$THEME->csstreepostprocessor = 'theme_boost_css_tree_post_processor';
$THEME->csstreepostprocessor = null;

Just to re-test I used the latest 3.3+ as it is and the problem occurred - the same for 3.2.3+


The only way I get a usable system on 3.2.3+ and 3.3+ is to do the above.












=


 
Average of ratings: -
It's only an avatar...
Re: Boost theme not working in upgraded site
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

I'm having problems with More theme in latest version of 3.3 wjere the CSS is failing to be processed.

But the Boost theme is working OK.

Its a real pain whatever it is.

 
Average of ratings: -
Picture of Rick Jerz
Re: Boost theme not working in upgraded site
Group Particularly helpful Moodlers

I just tried switching from my Boost theme to my MORE theme that still has my own CSS in it.  The MORE theme seems to be working.  I could not detect anything wrong with it.

Moodle 3.3+ (Build: 20170616)

PHP Version 5.6.27, MySQL 5.6.33

 
Average of ratings: -
Picture of John Cook PhD
Re: Boost theme not working in upgraded site
 

I have just tested More on my 3.3+ site and it works OK BUT I have the lines in Boost config are rem out so that Boost works as well.

But if I make More my default theme then it still works OK.

My old theme based on clean also works OK and this is quite old.

 
Average of ratings: -