Child theme not shown in theme selector

Child theme not shown in theme selector

by Alan Quaino -
Number of replies: 6

Hi all,

I've just created a Boost child theme following the instructions at https://docs.moodle.org/dev/Creating_a_theme_based_on_boost and it is not shown in the Moodle's theme selector.

The permissions of the directories are correct (the same of the other themes) and I've already tried all the solutions of other forums. The problem is only related to child themes: if I add an "official" theme it is ok and visibile.

What can I do? My main goal is to have a child theme for changing css and other stuff without editing it via the Boost's SCSS web editor.


Thank you in advance,

Alan

Average of ratings: -
In reply to Alan Quaino

Re: Child theme not shown in theme selector

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Moodle version please.

Are you using the same Moodle that you've uploaded the theme files to?
In reply to Gareth J Barnard

Re: Child theme not shown in theme selector

by Alan Quaino -
Moodle 3.7.1+ (Build: 20190712).

I followed the steps described in the link I posted before. Since it was not working from the beginning, I tried to replace the files required by a theme with the original files of Boost theme.
So I imported the same "config.php" file (with the correct modifications, such as changing the name of the theme etc.), the same "lang" directory, and so on.

I attach to this message the directory of the "boost-child" theme I am talking about.

Thank you

In reply to Alan Quaino

Re: Child theme not shown in theme selector

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Ok, two things:

1. There is a hyphen in the name and looks like plugin names won't work with hyphens. I can't remember off the top of my head where this is documented. Changing to 'boost_child' will work.
2. You have a coding fault in version.php which needs to change from:

$plugin->dependencies = [
    'theme_boost' => '2019052000';
]
to

$plugin->dependencies = [
    'theme_boost' => '2019052000'
];
Average of ratings: Useful (2)
In reply to Gareth J Barnard

Re: Child theme not shown in theme selector

by Alan Quaino -
It works! Thank you so much, if there was the rule about plugin names and hyphens in the moodle tutorial on children themes the problem would have been almost solved.

Thanks again Gareth
In reply to Alan Quaino

Re: Child theme not shown in theme selector

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

Do feel free to improve the documentation with your experience.

Thanks,

Gareth