Can not change themes after 3.4 upgrade

Can not change themes after 3.4 upgrade

by mart van der niet -
Number of replies: 16
  • I made a clone from my old Moodle 3.1.3 (Build: 20161114)
  • Now running Moodle 3.4.1+ (Build: 20180223)
  • Started the new installation with theme Clean
  • When selecting a new theme in the theme selector, it does not take effect, tried several themes: Boost, Essential 
  • In mdl_config the new theme is set.
  • Debugging does not show any fault.
  • Yes, I have purged the caches.

 

Any hint to what is wrong here?

 

Average of ratings: -
In reply to mart van der niet

Re: Can not change themes after 3.4 upgrade

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

Perhaps the server is looking in the wrong place and making changes elsewhere In your old Moodle 3.1 database!

In reply to Mary Evans

Re: Can not change themes after 3.4 upgrade

by mart van der niet -

Interesting, but how could that be?

Obviously it is reading from the right db, so how could it write to the wrong db?

Inspection of mdl_config shows the new them being written to the db.

In reply to mart van der niet

Re: Can not change themes after 3.4 upgrade

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

Are there any error messages in the php.log file?

Is the site available on the web?

If you turn on 'allowthemechangeonurl' setting, then does the theme change via the URL?

Is theme designer mode on?  If not then when you purge all caches and look at the URL for the 'all' CSS file in the network tab of the browser development tools (F12) does the theme revision number increase?

In reply to Gareth J Barnard

Re: Can not change themes after 3.4 upgrade

by mart van der niet -

Hi Gareth,

Site is available on the web (I guess you mean accessible through browser)

Change theme via UTL is turned on, no effect

Theme designer is on, but I'm afraid I do not quite understand what you mean by the URL for the 'all' CSS file in the network tab of the browser development tools (F12). See a lot of tabs with F12, both in Chrome and in Firefix, but not sure which you  mean...

In php.log:

[Tue Feb 27 09:38:33.530641 2018] [lsapi:notice] [pid 27599:tid 139723490072320] [client 80.57.196.118:61135] [host upgradelearning.cobytes.io] Backend log: Default exception handler: Coding error detected, it must be fixed by a programmer: Unexpected output whilst processing AJAX request. This could be caused by trailing whitespace. Output received: '\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n' Debug: \nError code: codingerror\n* line 77 of /lib/ajax/ajaxlib.php: coding_exception thrown\n* line 52 of /lib/ajax/getsiteadminbranch.php: call to ajax_check_captured_output()\n, referer: http://upgradelearning.cobytes.io/nimo/my/
[Tue Feb 27 09:39:13.976574 2018] [lsapi:notice] [pid 27599:tid 139723330610944] [client 80.57.196.118:61154] [host upgradelearning.cobytes.io] Backend log: Default exception handler: Coding error detected, it must be fixed by a programmer: Unexpected output whilst processing AJAX request. This could be caused by trailing whitespace. Output received: '\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n' Debug: \nError code: codingerror\n* line 77 of /lib/ajax/ajaxlib.php: coding_exception thrown\n* line 52 of /lib/ajax/getsiteadminbranch.php: call to ajax_check_captured_output()\n, referer: http://upgradelearning.cobytes.io/nimo/course/view.php?id=72

 

 

In reply to mart van der niet

Re: Can not change themes after 3.4 upgrade

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

Ok....

So if it's on the web, would you be willing to share the URL for us to look?

Turn of TDM.

Network tab and learn about browser development tools -> https://developers.google.com/web/tools/chrome-devtools/#network - filter on 'CSS' with the tab 'CSS' and look for a name of 'all'.

Error log may indicate that you've FTP'd things wrongly in ASCII transfer mode only.

In reply to Gareth J Barnard

Re: Can not change themes after 3.4 upgrade

by mart van der niet -

I've send you account details to look as an admin.

 

Is this the tab you mean in F12 ??

FTP: is default in binary mode.

I uploaded the moodle zip file, and extracted it on the server with php-zip

 

 

In reply to mart van der niet

Re: Can not change themes after 3.4 upgrade

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

Yes and the 'all' file you see in the list.

Also 'http://upgradelearning.cobytes.io/nimo' is 'ERR_NAME_RESOLUTION_FAILED'.

And FontAwesome 4.2.0?  What theme is that?

In reply to Gareth J Barnard

Re: Can not change themes after 3.4 upgrade

by mart van der niet -

seems to be a trailing ' after the site name... http://upgradelearning.cobytes.io/nimo should work!

In reply to mart van der niet

Re: Can not change themes after 3.4 upgrade

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

I still cannot see the site.  Was the subdomain DNS added recently?

In reply to Gareth J Barnard

Re: Can not change themes after 3.4 upgrade

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

I can see it and it is faster than I found it last night.

http://upgradelearning.cobytes.io/nimo/login/index.php

In reply to Mary Evans

Re: Can not change themes after 3.4 upgrade

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

I've done a few 'whois' lookups and it has no records, therefore... possibly why its not showing for me DNS wise.  Otherwise will need to know the IP and alter the hosts file to point to it.

In reply to mart van der niet

Re: Can not change themes after 3.4 upgrade

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

Looking for Nimo - one would suspect that because you cannot change theme and the theme settings are not being honoured, could be caused by the fact that they have be set in your Moodle root config.php.

just a thought?

If they are then you would see them hilighted in yellow or some other bright colour in...

Site Administration > Appearance > Themes > Theme settings page.
In reply to Mary Evans

Re: Can not change themes after 3.4 upgrade

by mart van der niet -

(NIMO not my choice for the site name smile)

 

When I put $CFG->theme = "essential"  in the config.php, the theme selection page shows just the essential theme, with "Defined in config.php" as a message.

However, the theme does not show....

In reply to mart van der niet

Re: Can not change themes after 3.4 upgrade

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

I got this error just now:

This page should be using theme adaptable which cannot be initialised. Falling back to the site theme boost

  • line 691 of /lib/outputlib.php: call to debugging()
  • line 825 of /lib/setup.php: call to theme_config::load()
  • line 46 of /config.php: call to require_once()
  • line 27 of /login/index.php: call to require()

So perhaps you have the wrong theme listed in Theme selector?

Looks like a problem with Adaptable, try checking to see if there is an update for it?

In reply to Mary Evans

Re: Can not change themes after 3.4 upgrade

by mart van der niet -

I do not use the theme Adaptable. Installed the Essential theme by unzipping theme_essential_moodle34_2017102900.zip

In reply to mart van der niet

Re: Can not change themes after 3.4 upgrade

by mart van der niet -

After some carefull work of Gareth:

 

The cause of the problem seems to be that somehow the field mdl_course.theme was filled with a value, for course id=1 (site).

Removing this solved the problem.