[multilang2] "Exception - Class 'filter_multilang2\text_filter' not found" at upgrade breaks sites

[multilang2] "Exception - Class 'filter_multilang2\text_filter' not found" at upgrade breaks sites

by Visvanath Ratnaweera -
Number of replies: 6
Picture of Particularly helpful Moodlers Picture of Translators

The recent, 2024101201, upgrade breaks sites with the error "Exception - Class 'filter_multilang2\text_filter' not found". See multilang2 upgrade failed and now I can't access the system.

Any information on what happens?

Average of ratings: -
In reply to Visvanath Ratnaweera

Re: [multilang2] "Exception - Class 'filter_multilang2\text_filter' not found" at upgrade breaks sites

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Which version of the Multilang2 filter are you using?

When upgrading one of my demo sites, I hit the same snag. I just went ahead with the Moodle upgrade, then downloaded the latest version and replaced the contents of mymoodledemo/filter multilangw/ folder with the new filter_multilang2 version 2.0.3. Note this version was released just three days ago.
In reply to AL Rachels

Re: [multilang2] "Exception - Class 'filter_multilang2\text_filter' not found" at upgrade breaks sites

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Moodle:
$version  = 2022112813.00;
$release  = '4.1.13 (Build: 20240902)';
$branch   = '401';
$maturity = MATURITY_STABLE;

Before the upgrade:
$plugin->version = 2024013101;
$plugin->requires = 2021051700;
$plugin->component = 'filter_multilang2';
$plugin->release = '2.0.1';
$plugin->maturity = MATURITY_STABLE;

After the upgrade:
$plugin->version = 2024101201;
$plugin->requires = 2021051700;
$plugin->component = 'filter_multilang2';
$plugin->release = '2.0.3';
$plugin->maturity = MATURITY_STABLE;
 
But that upgrade blocked the whole site with the error in subject. So I moved the filter/multilang2 away and the site recovered. Happened yesterday. Another person reported it today. (The discussion linked in the OP.)
In reply to Visvanath Ratnaweera

Re: [multilang2] "Exception - Class 'filter_multilang2\text_filter' not found" at upgrade breaks sites

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers

This looks exactly like https://github.com/iarenaza/moodle-filter_multilang2/issues/53 , which at the end doesn't seem to be a coding error, but some PHP or Moodle cache not being up to date. Could any of you please try the mentioned "workaround" (the same thing can be done from the Moodle admin UI, under the "Development" section):

php admin/cli/purge_caches.php

and report back if that fixes the issue?

Saludos.

Iñaki.

In reply to Visvanath Ratnaweera

Re: [multilang2] "Exception - Class 'filter_multilang2\text_filter' not found" at upgrade breaks sites

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
There were big changes to the way Filters work in Moodle 4.5. The issue reported here affects backwards compatibility with Moodle LMS prior to version 4.5. Hopefully there will be a new official release that addresses the issue shortly.
 
In the meantime, you can learn about what the solution is, including a quick fix, in:
https://moodle.org/mod/forum/discuss.php?d=462953#p1858858
 
Hope you find this helpful.

Best regards,

Michael Milette
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: [multilang2] "Exception - Class 'filter_multilang2\text_filter' not found" at upgrade breaks sites

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
For those who are new to this thread, the one in the Installing and upgrading forum, multilang2 upgrade failed and now I can't access the system, is more up to date. Please follow up there.