marinaglancy / moodle-format_flexsections

25 stars 25 forks source link

Missing lang string errors on Moodle 4.1 #55

Closed logan-reynolds closed 1 year ago

logan-reynolds commented 1 year ago

Running latest format_flexsections version 2023050600 on Moodle 4.1.2 (Build: 20230313), the following missing string errors are shown during install and on the site post-install when debugging is enabled. Looks like it is most likely occurring because of changes to the format_topic component in M41:

Invalid get_string() identifier: 'resetindentation' or component 'admin'. Perhaps you are missing $string['resetindentation'] = ''; in lang/en/admin.php?

    line 356 of /lib/classes/string_manager_standard.php: call to debugging()
    line 7409 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
    line 29 of /course/format/flexsections/settings.php: call to get_string()
    line 137 of /lib/classes/plugininfo/format.php: call to include()
    line 59 of /admin/settings/plugins.php: call to core\plugininfo\format->load_settings()
    line 8831 of /lib/adminlib.php: call to require()
    line 31 of /admin/search.php: call to admin_get_root()

String does not exist. Please check your string definition for indentation/format_topics

    line 10770 of /lib/moodlelib.php: call to debugging()
    line 32 of /course/format/flexsections/settings.php: call to lang_string->__construct()
    line 137 of /lib/classes/plugininfo/format.php: call to include()
    line 59 of /admin/settings/plugins.php: call to core\plugininfo\format->load_settings()
    line 8831 of /lib/adminlib.php: call to require()
    line 31 of /admin/search.php: call to admin_get_root()

String does not exist. Please check your string definition for indentation_help/format_topics

    line 10770 of /lib/moodlelib.php: call to debugging()
    line 33 of /course/format/flexsections/settings.php: call to lang_string->__construct()
    line 137 of /lib/classes/plugininfo/format.php: call to include()
    line 59 of /admin/settings/plugins.php: call to core\plugininfo\format->load_settings()
    line 8831 of /lib/adminlib.php: call to require()
    line 31 of /admin/search.php: call to admin_get_root()

Invalid get_string() identifier: 'indentation_help' or component 'format_topics'. Perhaps you are missing $string['indentation_help'] = ''; in /var/www/html/course/format/topics/lang/en/format_topics.php?

    line 356 of /lib/classes/string_manager_standard.php: call to debugging()
    line 10799 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
    line 10833 of /lib/moodlelib.php: call to lang_string->get_string()
    line 33 of /course/format/flexsections/settings.php: call to lang_string->__toString()
    line 137 of /lib/classes/plugininfo/format.php: call to include()
    line 59 of /admin/settings/plugins.php: call to core\plugininfo\format->load_settings()
    line 8831 of /lib/adminlib.php: call to require()
    line 31 of /admin/search.php: call to admin_get_root()
marinaglancy commented 1 year ago

Hello, These strings were added to core in 4.1.3 and 4.0.8, please see:

https://github.com/moodle/moodle/blob/MOODLE_401_STABLE/lang/en/admin.php#L1134 https://github.com/moodle/moodle/blob/MOODLE_401_STABLE/course/format/topics/lang/en/format_topics.php#L39

Unfortunately, the latest version of format_flexsections will show these errors if your Moodle was not updated. I suggest you revert to the previous version of the plugin until you are ready to upgrade Moodle.

Several people have asked me to add support for indentation that was backported in core. Unfortunately, in this case I can not specify which is the minimum required Moodle version for the plugin.

marinaglancy commented 1 year ago

https://tracker.moodle.org/browse/MDL-76994 is the relevant core issue