andrewhancox / moodle-filter_translations

7 stars 8 forks source link

Accessing "All missing translations" page produces error when language is English #145

Closed rjnl closed 1 year ago

rjnl commented 1 year ago

The following error occurs when accessing "All missing translations" page:/filter/translations/managetranslationissues.php?issue=20&targetlanguage=en

Accessing the same page with any other language works just fine.

Coding error detected, it must be fixed by a programmer: Invalid context id specified context::instance_by_id()

Stack trace:
line 5300 of \lib\accesslib.php: coding_exception thrown
line 217 of \filter\translations\classes\managetranslationissues_table.php: call to context::instance_by_id()
line 805 of \lib\tablelib.php: call to filter_translations\managetranslationissues_table->col_context()
line 1968 of \lib\tablelib.php: call to flexible_table->format_row()
line 2092 of \lib\tablelib.php: call to table_sql->build_table()
line 103 of \filter\translations\managetranslationissues.php: call to table_sql->out()
rjnl commented 1 year ago

Fixed with: https://github.com/rjnl/moodle-filter_translations/commit/b3868063a141ed84253bb61ca428e4d1a4e65041