Bootstrap 3 parent theme Stable

Bootstrap 3 parent theme Stable

by Bas Brands -
Number of replies: 20
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers

Introducing theme bootstrap 3 stable


After ticking of issues on GitHub for a long time I have now made parent theme Bootstrap 3 available as a Stable theme on the Moodle plugins database.

For those not familiar with this theme

It's a clean and simple theme based on the Bootstrap framework:

http://getbootstrap.com/

And very similar to the bootstrapbase theme which is based on Bootstrap version 2.

This theme can be used on it's own, but it's better to use a bootswatch child theme like cerulean which has more options and can look nice and funky and have POP! (hence the "Rainbow high in the Sky reference")

Creating child themes based on bootswatches is fun relatively easy to do. Check out the available bootswatches on :

http://bootswatch.com/

For those already using this theme / developers

After many months of development and fixes I now declare it (kind of) stable. It's not perfect and Right To Left languages remain somewhat of an issue.

Any help on fixing bugs / enhancements are more than welcome and I want to thank all of you that have already spend lot's of time helping out. David, Gareth, Mary, Stuart, Joby and all others. Thanks very much for all your help.


So what's next?

I will create some child themes using the bootswatches based on jQuery and release them on the plugins list and try to get all bootstrapbase improvements that have been added by HQ into this theme as well. smile

download here

report issues here

Average of ratings: Useful (4)
In reply to Bas Brands

Re: Bootstrap 3 parent theme Stable

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

Hi Bas...thanks for this.

Will it work on Moodle 2.8 (master)? 

I'm gonna test it shortly and will let you have feed back if anything major happens while doing so, so expect not to hear from me! LOL

Cheers

cheers

Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: Bootstrap 3 parent theme Stable

by Bas Brands -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers

I hope it will work. I have only tested on the latest stable 2.7 blush

In reply to Bas Brands

Re: Bootstrap 3 parent theme Stable

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Totally awesome Bas smile.

This means that I can make Shoehorn stable too smile.

Average of ratings: Useful (1)
In reply to Bas Brands

Re: Bootstrap 3 parent theme Stable

by Mauno Korpelainen -

I just installed Bootstrap3 to (almost fresh) Moodle 2.7.2+ (Build: 20140911) and all css is lost... wide eyes

First

Is there some setting I have missed - I did purge all caches, tried to reload the theme, debugging did not give any php errors and browser (FF) inspecting gave only some css warnings?

second

In reply to Mauno Korpelainen

Re: Bootstrap 3 parent theme Stable

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Mauno,

Are there any 404 errors in the network tab to indicate that something is missing?  Given the error messages then there does appear to be a syntax issue somewhere but cannot tell where from the current set of information.  Also odd that yui_combo.php is having the error when should be styles.php.  Any other errors?  Do the other themes work in the installation?  Have all the files been uploaded to the server?

Gareth

In reply to Gareth J Barnard

Re: Bootstrap 3 parent theme Stable

by Mauno Korpelainen -

In FF (Inspect element) I got this message

error

This is a local test install.

I noticed that if I switch Theme designer mode on theme css is used but not if default setting Theme designer mode is Off.

Other themes are working ok so this might come from some setting in theme config.php.

 

In reply to Mauno Korpelainen

Re: Bootstrap 3 parent theme Stable

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Humm, I think it might be a clash / issue in the style sheets that is confusing Moodle's sheet caching mechanism.  Time for an issue on Github: https://github.com/bmbrands/theme_bootstrap/issues/342.

In reply to Gareth J Barnard

Re: Bootstrap 3 parent theme Stable

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Ok, set-up a Moodle 2.7.2+ (Build: 20141002) reference system with downloaded version and could not replicate in Chrome 37.0.2062.124 , FireFox 32.0.3 and IE 11.  So must be you somehow.

In reply to Gareth J Barnard

Re: Bootstrap 3 parent theme Stable

by Mauno Korpelainen -

I wish it was just me but this happens in all my browsers (FF 32.0.3), Chrome (37.0.2062.124), IE (11.0.12)...

I reinstalled the latest moodle 2.7.2+ version (20141002) and moved Bootstrap3 theme to a new install with no extra plugins. With default settings. This is an ApacheFriends XAMPP Version 1.8.3 test PC (Windows7) and all core themes render css without problems. I have not tested other custom themes here but also Essential was ok. Only Bootstrap3 gets broken css.

It could be some "Windows issue" but I suspect some file type/content problem in those GIT files. I downloaded the theme first from the download link and later from the GIT site directly ( https://github.com/bmbrands/theme_bootstrap ) with Download ZIP button - unzipped the file and used the same method of installing Moodle Themes I have done about 1000 times.

In reply to Mauno Korpelainen

Re: Bootstrap 3 parent theme Stable

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Mauno,

Interesting.  Could be a PHP version difference issue in the way it works.

The real test on the same set-up would be to try Elegance as that is based upon Bootstrap V3 or even my Shoehorn which needs it as a parent but implements its own CSS.

Gareth

In reply to Gareth J Barnard

Re: Bootstrap 3 parent theme Stable

by Mauno Korpelainen -

Elegance seems to be broken too surprise - at least in this environment

(theme package downloaded from https://moodle.org/plugins/view.php?plugin=theme_elegance)

If nobody else has seen this it must happen in my test PC only mixed

In reply to Mauno Korpelainen

Re: Bootstrap 3 parent theme Stable

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Please could you test Shoehorn too: https://moodle.org/mod/forum/discuss.php?d=271529

For information, is the 'all' file blank or broken at a given point?  Are there any messages with developer level debugging turned on?

In reply to Gareth J Barnard

Re: Bootstrap 3 parent theme Stable

by Mauno Korpelainen -

The samehappens to Shoehorn - these Bootstrap3 based themes do not send any css to local cache, there is no "all" file or even css folder in localcache.

I don't think version of php has any impact - core themes work fine with Theme designer mode disabled or enabled. No debugging info at all - no errors in apache error log.

This happens only in these bootstrap3 themes - I am surprised if nobody has seen this on Windows XAMPP environment???

In reply to Mauno Korpelainen

Re: Bootstrap 3 parent theme Stable

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thanks for the information Mauno.

I've been able to run Shoehorn with TDM off both locally and on a hosted apache server.

What version of apache / PHP are you running?

Could you try on Bitnami please: https://bitnami.com/stack/moodle.

In reply to Gareth J Barnard

Re: Bootstrap 3 parent theme Stable

by Mauno Korpelainen -

Apache/2.4.7 (Win32) PHP/5.5.6

I could try Bitnami tomorrow but I have really tried to figure out what could cause this test PC issue...

file /theme/styles.php has a comment

    // Lock system to prevent concurrent requests to compile LESS, which is really slow and CPU intensive.
    // Each client should wait for one to finish the compilation before starting a new compiling process.
    // We only do this when the file will be cached...

and I have a feeling that this might be caused by too limited resources of my test PC (this is not a super server)

It could be that compiling those Bootstrap LESS files to cache fails because it takes longer than system lock time and no css is saved to localcache with css_send_cached_css ???

But this is just a thought - the reason could be something else - all I know for sure is that in my test PC cache folders of these Bootstrap3 themes have no css folder and core themes have (with a couple of "all" files containing theme css)

I have about 100 exam papers that I should check before Saturday (before a short holiday trip) so I may not be able to test this further during the next week but I can send some more info if I find out some better explanation wink

In reply to Mauno Korpelainen

Re: Bootstrap 3 parent theme Stable

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thank you Mauno for the information provided already.  I may see if I can setup a separate similar setup and debug.

The Bootstrap v3 theme already has the CSS files compiled from the LESS so that part of styles.php is not used.

In reply to Gareth J Barnard

Re: Bootstrap 3 parent theme Stable

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Moodlers,

After lots of investigation there appears to be an issue with the core minimiser on PHP 5.5.6 or less.  Therefore to use Bootstrap V3 / Shoehorn and possibly Elegance, please use PHP 5.5.7+ or comment out: https://github.com/moodle/moodle/blob/MOODLE_27_STABLE/lib/minify/lib/Minify/CSS/Compressor.php#L112-L124.

Or please try adding:

< ifmodule mpm_winnt_module="">
   ThreadStackSize 8388608
< /ifmodule>

Note: Remove the white space! after the '<'.

To your Apache httpd.conf file after loading modules, restart and yet us know.

Full tale of woe on: https://github.com/bmbrands/theme_bootstrap/issues/342

Cheers,

Gareth

Average of ratings: Useful (4)
In reply to Gareth J Barnard

Re: Bootstrap 3 parent theme Stable

by Mauno Korpelainen -

Perfect!

Adding

<IfModule mpm_winnt_module>
   ThreadStackSize 8388608
</IfModule>

to Apache http.conf worked magically big grin

 

In reply to Mauno Korpelainen

Re: Bootstrap 3 parent theme Stable

by Bas Brands -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers

Woot!

I am so glad this one was tracked and fixed. That's been quite a walk in the Moodle coding dungeons. Love that!