Open jonathanfield opened 2 years ago
Hi,
I have posted a patch which will resolve the plugin Error 500 issues in Koha 21.05 and 21.11, while retaining functionality in Koha versions prior to 21.05.
My JavaScript skills are a little rusty, but I plan to address the issues present in the labelling soon. I'll attach the pull request to this issue when the time arises.
Thanks, Jake Deery
Please test the kpz in PR #118 . I've implemented PR #117 there and much of what is discussed here is addressed.
As a note, StartEDS('default') should not be required in OpacUserJS. By hardcoding "default", it would disable the ability for it to leverage languages of the user. If StartEDS is not running, it's possible there's something going wrong with the detection of the language and it's not switching to default when no language file is created, or it's possible that the default language file is not being found. StartEDS should run automatically once the plugin is installed with no customization required, but I'm also happy to continue this discussion if you're encountering more issues.
Note that after update, you MUST go into the configuration and save the configuration of the plugin. This will trigger a template that generates an updated JS file.
We need to use: -
use C4::Auth qw(:DEFAULT get_session get_template_and_user );
anduse C4::Output qw( output_with_http_headers );
Instead of: -
use C4::Auth qw(:DEFAULT get_session );
anduse C4::Output;
plugin/Koha/Plugin/EDS/opac/eds-search.pl returning a 500 error.
As describe in [https://github.com/ebsco/edsapi-koha-plugin/issues/112](Issue 112) you also require the
StartEDS('default');
in OpacUserJS
We hope to supply a patch presently.