Boost theme not working in upgraded site

Re: Boost theme not working in upgraded site

by John Cook PhD -
Number of replies: 18

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: Useful (1)
In reply to John Cook PhD

Re: Boost theme not working in upgraded site

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of 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 (3)
In reply to Richard Oelmann

Re: Boost theme not working in upgraded site

by John Cook PhD -

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

In reply to Richard Oelmann

Re: Boost theme not working in upgraded site

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

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.  

In reply to Richard Oelmann

Re: Boost theme not working in upgraded site

by Frederic Nevers -

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

In reply to Frederic Nevers

Re: Boost theme not working in upgraded site

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of 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

In reply to Mary Evans

Re: Boost theme not working in upgraded site

by Frederic Nevers -

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

In reply to Frederic Nevers

Re: Boost theme not working in upgraded site

by Frederic Nevers -

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

In reply to Frederic Nevers

Re: Boost theme not working in upgraded site

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

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?

In reply to Gordon Bateson

Re: Boost theme not working in upgraded site

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

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

In reply to Gordon Bateson

Re: Boost theme not working in upgraded site

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

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  

In reply to Gordon Bateson

Re: Boost theme not working in upgraded site

by Mihir J -

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

In reply to Mihir J

Re: Boost theme not working in upgraded site

by John Cook PhD -

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.












=


In reply to John Cook PhD

Re: Boost theme not working in upgraded site

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of 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.

In reply to Mary Evans

Re: Boost theme not working in upgraded site

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

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

In reply to Mary Evans

Re: Boost theme not working in upgraded site

by John Cook PhD -

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.

In reply to John Cook PhD

Re: Boost theme not working in upgraded site

by Nick Gault -

Moodle 3.4.1+ (Build: 20180208)

Any attempt to use Boost results in the broken css scenario. I have adjusted the timeouts and removed additional plugins and still the issue remains.

When I build the theme css at the command line I get the following:


== Build theme css ==

Default exception handler: Exception - Undefined variable $card-bg: line: 80 Debug:
Error code: generalexceptionmessage
* line 3470 of /lib/scssphp/Compiler.php: Leafo\ScssPhp\Exception\CompilerException thrown
* line 3138 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->throwError()
* line 2107 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->get()
* line 1612 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->reduce()
* line 126 of /lib/classes/scss.php: call to Leafo\ScssPhp\Compiler->compileChild()
* line 1285 of /lib/scssphp/Compiler.php: call to core_scss->compileChild()
* line 1038 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileChildrenNoReturn()
* line 1560 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileBlock()
* line 126 of /lib/classes/scss.php: call to Leafo\ScssPhp\Compiler->compileChild()
* line 1285 of /lib/scssphp/Compiler.php: call to core_scss->compileChild()
* line 3370 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileChildrenNoReturn()
* line 1480 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->importFile()
* line 1542 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileImport()
* line 118 of /lib/classes/scss.php: call to Leafo\ScssPhp\Compiler->compileChild()
* line 1285 of /lib/scssphp/Compiler.php: call to core_scss->compileChild()
* line 3370 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileChildrenNoReturn()
* line 1480 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->importFile()
* line 1542 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileImport()
* line 118 of /lib/classes/scss.php: call to Leafo\ScssPhp\Compiler->compileChild()
* line 1285 of /lib/scssphp/Compiler.php: call to core_scss->compileChild()
* line 295 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileChildrenNoReturn()
* line 194 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileRoot()
* line 98 of /lib/classes/scss.php: call to Leafo\ScssPhp\Compiler->compile()
* line 1476 of /lib/outputlib.php: call to core_scss->to_css()
* line 1093 of /lib/outputlib.php: call to theme_config->get_css_content_from_scss()
* line 208 of /lib/outputlib.php: call to theme_config->get_css_content()
* line 117 of /admin/cli/build_theme_css.php: call to theme_build_css_for_themes()
 
!!! Exception - Undefined variable $card-bg: line: 80 !!!
!!
Error code: generalexceptionmessage !!
!! Stack trace: * line 3470 of /lib/scssphp/Compiler.php: Leafo\ScssPhp\Exception\CompilerException thrown
* line 3138 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->throwError()
* line 2107 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->get()
* line 1612 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->reduce()
* line 126 of /lib/classes/scss.php: call to Leafo\ScssPhp\Compiler->compileChild()
* line 1285 of /lib/scssphp/Compiler.php: call to core_scss->compileChild()
* line 1038 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileChildrenNoReturn()
* line 1560 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileBlock()
* line 126 of /lib/classes/scss.php: call to Leafo\ScssPhp\Compiler->compileChild()
* line 1285 of /lib/scssphp/Compiler.php: call to core_scss->compileChild()
* line 3370 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileChildrenNoReturn()
* line 1480 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->importFile()
* line 1542 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileImport()
* line 118 of /lib/classes/scss.php: call to Leafo\ScssPhp\Compiler->compileChild()
* line 1285 of /lib/scssphp/Compiler.php: call to core_scss->compileChild()
* line 3370 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileChildrenNoReturn()
* line 1480 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->importFile()
* line 1542 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileImport()
* line 118 of /lib/classes/scss.php: call to Leafo\ScssPhp\Compiler->compileChild()
* line 1285 of /lib/scssphp/Compiler.php: call to core_scss->compileChild()
* line 295 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileChildrenNoReturn()
* line 194 of /lib/scssphp/Compiler.php: call to Leafo\ScssPhp\Compiler->compileRoot()
* line 98 of /lib/classes/scss.php: call to Leafo\ScssPhp\Compiler->compile()
* line 1476 of /lib/outputlib.php: call to core_scss->to_css()
* line 1093 of /lib/outputlib.php: call to theme_config->get_css_content_from_scss()
* line 208 of /lib/outputlib.php: call to theme_config->get_css_content()
* line 117 of /admin/cli/build_theme_css.php: call to theme_build_css_for_themes()
 !!

Googling some of these errors leads me to this page:

https://github.com/leafo/scssphp/issues/446

Which references Moodle.


Is anyone else having this issue with boost theme being broken in 3.4?




In reply to Nick Gault

Re: Boost theme not working in upgraded site

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Nick, 

Can I ask which theme were you using prior to upgrading to Moodle 3.4.1?

Thanks

Mary

In reply to Mary Evans

Re: Boost theme not working in upgraded site

by Nick Gault -

Hi Mary,


We have been using Boost without any issues.

I've tried to reproduce the issue on a fresh server but haven't been able to so I don't think that it is an errant plugin.


Nick