gjbarnard / moodle-theme_foundation

Foundation theme for Moodle.
GNU General Public License v3.0
8 stars 0 forks source link

Child-theme not working #2

Closed joao-gabriel closed 5 years ago

joao-gabriel commented 5 years ago

Hello,

I'm getting the following error when I activate my child-theme based on Foundation:

Coding error detected, it must be fixed by a programmer: Invalid component specified in renderer request
Debug info: theme_mytheme
Error code: codingerror
Stack trace:
line 197 of /lib/outputfactories.php: coding_exception thrown
line 389 of /lib/outputfactories.php: call to renderer_factory_base->standard_renderer_classnames()
line 2454 of /lib/outputlib.php: call to theme_overridden_renderer_factory->get_renderer()
line 864 of /lib/pagelib.php: call to theme_config->get_renderer()
line 127 of /theme/foundation/classes/toolbox.php: call to moodle_page->get_renderer()
line 57 of /theme/foundation/classes/output/mustache_engine.php: call to theme_foundation\toolbox->get_core_renderer()
line 165 of /lib/outputrenderers.php: call to theme_foundation\output\core_renderer->get_mustache()
line 389 of /theme/foundation/classes/output/core_renderer_boost.php: call to renderer_base->render_from_template()
line 226 of /lib/outputrenderers.php: call to theme_foundation\output\core_renderer->render_help_icon()
line 2464 of /lib/outputrenderers.php: call to renderer_base->render()
line 1893 of /lib/setuplib.php: call to core_renderer->help_icon()
line 217 of /mod/lti/settings.php: call to bootstrap_renderer->__call()
line 89 of /lib/classes/plugininfo/mod.php: call to include()
line 47 of /admin/settings/plugins.php: call to core\plugininfo\mod->load_settings()
line 8065 of /lib/adminlib.php: call to require()
line 802 of /admin/index.php: call to admin_get_root()

I'm not sure but it looks like Foundation function inside toolbox.php on line 127 gets the core redererer from the $PAGE->theme->name variable, which returns the name of my child-theme instead of the parent-theme (foundation) when I activate it.

So the code looks into my directory for the renderers instead and end up breaking, I guess I could copy these files into my child-theme but I would like to use the ones from the parent-theme.

I'm using Moodle 3.6.3 (Build: 20190311)

Thanks,

gjb2048 commented 5 years ago

Your question is in a queue and will be answered in a week or two.

gjb2048 commented 5 years ago

Ok, think 'OO' as you can always declare a class that extends another without overriding any methods.

gjb2048 commented 5 years ago

Ok, can I close this now?

joao-gabriel commented 5 years ago

I didn't have a chance to give it another try yet, but yes, you can close it. Thanks for your response.