I seem to recall that recently some work being done broke upgrade and install, and as a result now renderers get overidden in some special way during updates.
Does anyone know about this, or can point me to somewhere documenting this? I've tried Googling but I'm not finding anything relevant. Currently I seem to get upgrade screens that are half my theme, and half... something else.
Hi David,
is this what you are meaning?
Read comments at start of document about API
https://github.com/moodle/moodle/blob/master/theme/bootstrapbase/layout/maintenance.php
Cheers
Mary
it's not that exactly, but I think it's related. The bit of comment text that says "It's ultra important that this layout file makes no use of API's unless it absolutely needs to.", I seem to recall that got enforced by some code that swaps out theme renderers with other ones and that's what I'm hitting.
By looking up that bug, I found a link to this related bug which is what I was looking for,
https://tracker.moodle.org/browse/MDL-42057
regards,
dave
I would have thought that the code that instigates the themeoverriddenfactorymanager (or something like that) would change to the standardthemefactorymanager - search on 'factorymanager' would be the area that controls what set of renderers are being used.
To achieve what I want, I want to extend this renderer in my theme the same way as I intend to extend the normal core_renderer (an unfortunate bit of code duplication, but there appear to be reasons for this). I've not tried it yet but I assume it will work, I just have to be careful.
Oh ok,
The thing that does this is set by the line in the config.php file:
$THEME->rendererfactory = 'theme_overridden_renderer_factory';
And its the class 'theme_overridden_renderer_factory' that performs the class auto-loading of the theme renderers by looking for the file 'renderers.php' in the themes root folder. If that class has been swapped out in favour of the standard core one then overriding will not work.