Panopto / moodle-tiny_panoptoltibutton

Moodle plugin that allow users to embed LTI content into the TinyMCE rich text editor.
3 stars 1 forks source link

Missing string $string['helplinktext'] required by tiny plugins #5

Closed NJahreis closed 3 days ago

NJahreis commented 2 months ago

The function getPluginMetadata in https://github.com/moodle/moodle/blob/b798633ae074eddd581724d0c5b1cdba01b9d909/lib/editor/tiny/amd/src/utils.js#L242-L250 expects the tiny plugins to define $string['helplinktext']. This leads to the following error then the function is invoked:

Got error 'PHP message: Debugging: Invalid get_string() identifier: 'helplinktext' or component 'tiny_panoptoltibutton'. Perhaps you are missing $string['helplinktext'] = '';
in /moodle/apache2/htdocs/lib/editor/tiny/plugins/panoptoltibutton/lang/en/tiny_panoptoltibutton.php? in 
line 356 of /lib/classes/string_manager_standard.php: call to debugging()
line 109 of /lib/external/externallib.php: call to core_string_manager_standard->get_string()
line ? of unknownfile: call to core_external::get_string()
line 253 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()
line 33 of /lib/ajax/service-nologin.php: call to require_once()
', referer: https://MYMOODLE.de/XXX

Most tiny plugins just use the plugin name for this string so adding $string['helplinktext'] = 'PanoptoLTI Button'; to https://github.com/Panopto/moodle-tiny_panoptoltibutton/blob/master/lang/en/tiny_panoptoltibutton.php will fix this issue.

zeroAps commented 2 months ago

Hello,

Thank you for reporting this issue. We will track this internally, investigate and fix if needed.

Thanks, Adis

zeroAps commented 3 days ago

We have added this in the latest version of the plugin that now has been released. Closing this for now.