Upgrade from 4.0.10 to 4.2.2

Upgrade from 4.0.10 to 4.2.2

by Davide Rossi -
Number of replies: 8
Hi,

I upgraded Moodle 4.0.10 (running CentOS v7.9.2009 STANDARD on whm Cpanel) to Moodle 4.2.2

MariaDB 10.6.15
php 8.1

Theme Boost

We no longer have access to the course content.

If topcoll (course format)  is active, the server gives a 500 error, so we uninstalled the plugin topcoll.

I hope the php log can help:

[16-Aug-2023 19:01:31 Europe/Rome] Debugging: Format plugin format_topcoll is not found. Using default format_singleactivity in 

* line 140 of /course/format/classes/base.php: call to debugging()

* line 201 of /course/format/classes/base.php: call to core_courseformat\base::get_format_or_default()

* line 38 of /course/format/lib.php: call to core_courseformat\base::instance()

* line 3096 of /lib/modinfolib.php: call to course_get_format()

* line 558 of /lib/modinfolib.php: call to section_info->__construct()

* line 436 of /lib/modinfolib.php: call to course_modinfo->__construct()

* line 2556 of /lib/modinfolib.php: call to course_modinfo::instance()

* line 1369 of /lib/completionlib.php: call to get_fast_modinfo()

* line 73 of /completion/classes/progress.php: call to completion_info->get_activities()

* line 214 of /course/classes/external/course_summary_exporter.php: call to core_completion\progress::get_course_progress_percentage()

* line 62 of /course/classes/external/course_summary_exporter.php: call to core_course\external\course_summary_exporter::get_course_progress()

* line 121 of /lib/classes/external/exporter.php: call to core_course\external\course_summary_exporter->get_other_values()

* line 101 of /blocks/starredcourses/classes/external.php: call to core\external\exporter->export()

* line ? of unknownfile: call to block_starredcourses_external::get_starred_courses()

* line 251 of /lib/external/classes/external_api.php: call to call_user_func_array()

* line 83 of /lib/ajax/service.php: call to core_external\external_api::call_external_function()


[16-Aug-2023 19:01:34 Europe/Rome] PHP Notice:  Format plugin format_topcoll is not found. Using default format_singleactivity<ul style="text-align: left" data-rel="backtrace"><li>line 140 of /course/format/classes/base.php: call to debugging()</li><li>line 201 of /course/format/classes/base.php: call to core_courseformat\base::get_format_or_default()</li><li>line 38 of /course/format/lib.php: call to core_courseformat\base::instance()</li><li>line 1165 of /lib/pagelib.php: call to course_get_format()</li><li>line 2863 of /lib/moodlelib.php: call to moodle_page->set_course()</li><li>line 85 of /course/view.php: call to require_login()</li></ul> in /home/formazione/public_html/fad/lib/weblib.php on line 3352

[16-Aug-2023 19:01:35 Europe/Rome] PHP Notice:  Format plugin format_topcoll is not found. Using default format_singleactivity<ul style="text-align: left" data-rel="backtrace"><li>line 140 of /course/format/classes/base.php: call to debugging()</li><li>line 201 of /course/format/classes/base.php: call to core_courseformat\base::get_format_or_default()</li><li>line 38 of /course/format/lib.php: call to core_courseformat\base::instance()</li><li>line 3096 of /lib/modinfolib.php: call to course_get_format()</li><li>line 558 of /lib/modinfolib.php: call to section_info->__construct()</li><li>line 436 of /lib/modinfolib.php: call to course_modinfo->__construct()</li><li>line 2556 of /lib/modinfolib.php: call to course_modinfo::instance()</li><li>line 2241 of /lib/modinfolib.php: call to get_fast_modinfo()</li><li>line 71 of /mod/forum/classes/local/factories/entity.php: call to cm_info::create()</li><li>line 129 of /mod/forum/classes/local/vaults/forum.php: call to mod_forum\local\factories\entity->get_forum_from_stdclass()</li><li>line ? of unknownfile: call to mod_forum\local\vaults\forum->mod_forum\local\vaults\{closure}()</li><li>line 122 of /mod/forum/classes/local/vaults/forum.php: call to array_map()</li><li>line 160 of /mod/forum/classes/local/vaults/db_table_vault.php: call to mod_forum\local\vaults\forum->from_db_records()</li><li>line 157 of /mod/forum/classes/local/vaults/forum.php: call to mod_forum\local\vaults\db_table_vault->transform_db_records_to_entities()</li><li>line 140 of /mod/forum/classes/local/vaults/forum.php: call to mod_forum\local\vaults\forum->get_from_course_module_ids()</li><li>line 52 of /mod/forum/view.php: call to mod_forum\local\vaults\forum->get_from_course_module_id()</li></ul> in /home/formazione/public_html/fad/lib/weblib.php on line 3352

Thank you for your advice!

Davide

Average of ratings: -
In reply to Davide Rossi

Re: Upgrade from 4.0.10 to 4.2.2

by Ken Task -
Picture of Particularly helpful Moodlers
Reinstall or upgrade the collapsed topics format manually.

'SoS', Ken

In reply to Ken Task

Ri: Re: Upgrade from 4.0.10 to 4.2.2

by Davide Rossi -
Thanks for the reply.
We tried but for now things still don't work.
Maybe a fresh install
In reply to Davide Rossi

Re: Ri: Re: Upgrade from 4.0.10 to 4.2.2

by Ken Task -
Picture of Particularly helpful Moodlers
Try installing manually again.
I see by
https://moodle.org/plugins/format_topcoll/versions
a 4.2 version was released Monday, 14 Aug 2023 5:42 AM
402.1.1 (2023042401)

Fresh install would wipe out what you have would it not?

By chance did you use Softaculous to upgrade from 4.0.x to 4.2.2?

Did you do a site backup (code+DB dump+minimal moodledata/filedir archive)  prior to the attempt to upgrade?

Have a CentOS 7 box (couple of them) and did have an issue with same format but upgrade to it fixed issues.

'SoS', Ken
 
Average of ratings: Useful (1)
In reply to Ken Task

Ri: Re: Ri: Re: Upgrade from 4.0.10 to 4.2.2

by Davide Rossi -
Thanks,

a 4.2 version was released Monday, 14 Aug 2023 5:42 AM
402.1.1 (2023042401) ---    I'll try again


By chance did you use Softaculous to upgrade from 4.0.x to 4.2.2?  --- NO

Did you do a site backup (code+DB dump+minimal moodledata/filedir archive)  prior to the attempt to upgrade?  ----NO

Have a CentOS 7 box (couple of them) and did have an issue with same format but upgrade to it fixed issues.   ---- I don't know, I'll check with my provider
In reply to Davide Rossi

Re: Ri: Re: Ri: Re: Upgrade from 4.0.10 to 4.2.2

by Ken Task -
Picture of Particularly helpful Moodlers
"Did you do a site backup (code+DB dump+minimal moodledata/filedir archive)  prior to the attempt to upgrade?  ----NO"

Strongly suggest you start making site backup a habit when you are about to upgrade.   Having a site backup to restore in case something goes terribly wrong is a 'best practice'.

Your hosting provider might have site backups themselves but they don't do specific/targeted applications like you would with a backup just for moodle.

Have never regretted taking the time to do it! smile

'SoS', Ken

In reply to Davide Rossi

Re: Ri: Re: Ri: Re: Upgrade from 4.0.10 to 4.2.2

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
"upgrade to it fixed issues" It is very rare by upgrading you solve an issue, more likely you get new issues.

What you need to know is that Moodle is a *server* application. Unlike desktop applications you don't upgrade them continuously. If you feel like it you can *update* (means move forward staying in the same major version 4.1.2 > 4.1.4, for example) at wish. But *upgrades* (over major versions, 4.0 > 4.1) need to be well planned. See Upgrading. See also https://moodledev.io/general/releases.
In reply to Davide Rossi

Re: Ri: Re: Upgrade from 4.0.10 to 4.2.2

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
YOu have not lost the course content but your course format has been set to single activity - set it to topics and your content should reappear.
In reply to Emma Richardson

Ri: Re: Ri: Re: Upgrade from 4.0.10 to 4.2.2

by Davide Rossi -


Thank you all.

We have nearly two hundred courses to check out, each with different settings

Some courses have reappeared but with all the activities hidden, others are messed up.

Everyone was asking us to have the course hierarchy, the indent and the move left and right of the activities again.

Yesterday our server was changed from Centos to almalinux


And since we are in the summer break it seemed like a good idea to update Moodle as well 🙂