'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Michael Chapman -
Number of replies: 12

Hi all - wonder if anyone can help me. So I just tried to upgrade my moodle site from 3.11.5 to 4.0 through the Softaculous installer (I made a backup first). Everything seemed to go fine, but then it said that I needed to visit the admin page to complete the installation and provided a link for this. When I clicked on the link, I got this error:


Unfortunately, the more information bit wasn't especially helpful:


Trying to visit the main page tries to reroute me to the admin page which then fails again, as above. Does anyone have any ideas? Thank you so much!

Average of ratings: -
In reply to Michael Chapman

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Rachid Elsabah -

I am facing the same issue as well, I wonder if any moderator to help solving this problem.



In reply to Michael Chapman

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by David Le Blanc -
You may want to send in a support request to Softaculous Support  https://softaculous.deskuss.com/. I also experienced errors with my upgrade. They were able to amend the errors. After things were fixed, I realized that I had was using an outdated course format (flexsections) which was causing exceptions to be thrown. See: https://moodle.org/mod/forum/discuss.php?d=433781
In reply to Michael Chapman

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Kamal Akhtar -

Hello Michael


The issue you are facing is because the theme you are using may not be compatible with Moodle 4.0

There is a simple fix to this.

After you have clicked on Upgrade through Softaculous and are asked to visit the admin page for complete installation, it would load a blank page with an error. 

Just go into File Manager > Moodle installation folder > config.php and add the following lines to it:

$CFG->theme = boost;

This basically tells the Moodle to ignore loading your current theme and switch to the default Boost theme for Moodle 4.0. 

After this refresh that admin url and you should be able to upgrade.

After the upgrade, visit the theme vendor where you purchased the theme from and download their updated theme for Moodle 4.0 if they have one, else continue to use the Boost theme until the release an update.

Hope this helps.

Please connect back should you need any further assistance.

Average of ratings:Useful (1)
In reply to Kamal Akhtar

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Michael Chapman -
Brilliant - that did it! Thank you so much. Two very quick follow-up questions if that's okay:

1) When I get back to the theme selectors page and try to change the theme to something that's not Boost, I get the same mod_assign_renderer error. I've downloaded an updated theme, but it doesn't look like I can currently apply it!
2) Using Boost, the admin pages fill the entire width of the screen, but the course pages are restricted to about the middle third of the page. Any idea how to fix that?

Thank you so much for your help again!
In reply to Michael Chapman

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You need to confirm that any theme is compatible with Moodle 4. My guess, is that (at this point) very few will be.
In reply to Howard Miller

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Michael Chapman -
Can I just check - are you suggesting that it's a problem with the Boost theme rather than with the settings on my site?
In reply to Michael Chapman

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
No - I mean if you have installed any optional themes that you need to be 100% sure they have been updated for Moodle 4.
In reply to Howard Miller

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Michael Chapman -
Ah. I can't even try to change them at this point. Clicking on any of the change theme buttons in the appearance menu gets the mod_assign_renderer error. Even though I'm not currently using it, would uninstalling older themes help? Earlier in this thread, I added $CFG->theme = boost; to config.php - would removing that help?
In reply to Michael Chapman

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That's certainly where I would start, yes. Delete incompatible plugins (themes in this case)
In reply to Michael Chapman

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Kamal Akhtar -
Hello Michael

1. From the theme selector you will still be able to change the theme to any other theme you want, however it will give this mod_assign_renderer error unless the theme is compatible with Moodle 4.0 and you will again go back into config.php and define the Boost or Classic theme to get back access to your instance.

2. The Boost theme is designed like that. The UI in Moodle 4.0 is designed to focus on learning and hence the course content is limited to the centre of the page with the Navigation bar collapsed on the right and Course Index collapsed on the left which can be expanded as required. The content was always centre in all Moodle version right.

The admin pages fill the entire screen as its expected you are carrying our administrative functions and the navigation is hidden as the relevant contextual menus are tabbed.

May I know which theme you are using?

If you are looking for a good theme that works with Moodle 4.0 you can check out the <... deleted by moderator ..>
Although this theme and some other themes would be compatible with Moodle they don't really make full use of the enhanced UI and layouts that Moodle 4.0 offers and have the same three column layout, but they do work.

I believe by the time Moodle 4.1 is released the themes should be updated make use of the enhanced UI offered by Moodle 4.0

Let me know should you need assistance with anything else!

(Edited by Howard Miller - commercial links are not permitted, original submission Friday, 22 April 2022, 11:46 AM)

Average of ratings:Useful (1)
In reply to Kamal Akhtar

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Michael Chapman -
Thanks so much for everyone's help with this. It turned out that the solution was to uninstall the old version of my previous theme (even though I'd switched to Boost using $CFG->theme = boost; in config.php) and then reinstall it using its 4.0 version. I'd have been sunk without your help! Cheers!
In reply to Michael Chapman

Re: 'mod_assign_renderer' error when upgrading from 3.11.5 to 4.0

by Kamal Akhtar -
Glad to know your issue stands resolved. In future you can simply install the new version of the theme over the previous one and Moodle will understand it and upgrade it. Good to see your concern resolved. That's what this community is about!

Cheers.