-
Bug
-
Resolution: Fixed
-
Minor
-
3.7
-
MOODLE_37_STABLE
-
MOODLE_37_STABLE
-
MDL-65699-master -
We are currently using calendar events in Workplace plugins and we are getting 'invalid get_string() identifier' messages because we are not using modules and is trying to locate strings in lang/en/calendar.php that don't exist. It would be nice if at least we can have this fixed while MDL-58866 is not resolved.
One way to test it shows a warning would be to change the ‘eventtype’ value directly in database in mdl_event table. Just create one 'User' type event and look for the eventin db and eventtype should be = ‘user’. Modify it manually to ‘tool_certification1’ and save it. After that go to Calendar and you should see a warning like this:
Invalid get_string() identifier: 'typetool_certification1' or component 'calendar'. Perhaps you are missing $string['typetool_certification1'] = ''; in lang/en/calendar.php?line 353 of /lib/classes/string_manager_standard.php: call to debugging()line 7255 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()line 278 of /calendar/classes/external/event_exporter_base.php: call to get_string()line 91 of /calendar/classes/external/calendar_event_exporter.php: call to core_calendar\external\event_exporter_base->get_other_values()line 125 of /lib/classes/external/exporter.php: call to core_calendar\external\calendar_event_exporter->get_other_values()line 205 of /calendar/classes/external/day_exporter.php: call to core\external\exporter->export()line ? of unknownfile: call to core_calendar\external\day_exporter->core_calendar\external\{closure}()line 206 of /calendar/classes/external/day_exporter.php: call to array_map()line 101 of /calendar/classes/external/week_day_exporter.php: call to core_calendar\external\day_exporter->get_other_values()line 125 of /lib/classes/external/exporter.php: call to core_calendar\external\week_day_exporter->get_other_values()line 164 of /calendar/classes/external/week_exporter.php: call to core\external\exporter->export()line 125 of /lib/classes/external/exporter.php: call to core_calendar\external\week_exporter->get_other_values()line 313 of /calendar/classes/external/month_exporter.php: call to core\external\exporter->export()line 215 of /calendar/classes/external/month_exporter.php: call to core_calendar\external\month_exporter->get_weeks()line 125 of /lib/classes/external/exporter.php: call to core_calendar\external\month_exporter->get_other_values()line 3429 of /calendar/lib.php: call to core\external\exporter->export()line 129 of /calendar/view.php: call to calendar_get_view() |
One proposal to resolve this issue could be adding "if string_exists()".
Thanks!