[Koha-devel] REST API not working in koha-testing-docker?
Hi all, I'm finally getting around to playing with the REST API, but it's not quite working as expected. In koha-testing-docker (with the latest koha-testing-docker git repo and Docker images as of this writing), I'm getting the following in the browser: 1. 200 OK a. http://localhost:8080/api/v1/.html b. http://localhost:8080/api/v1/ or http://localhost:8080/api/v1/.json 2. 500 Internal Server error (with no obvious messages in the server logs other than a missing "Routing to a callback") a. http://localhost:8080/api/v1/items b. http://localhost:8080/api/v1/patrons c. http://localhost:8080/api/v1/libraries If I use "curl" or a Perl script, then I get a 401 error instead of a 500 error. (Although in Koha 19.11, I can get JSON results in either the browser or with curl for those endpoints, but that's a whole other matter.) RESTBasicAuth = 1 means I can use the API via curl, but still nothing via the browser. Which is fine I guess in practice but it's not really what you'd expect. I often use browser requests to test out GET requests for APIs. I don't really get how RESTPublicAPI works either. If it's disabled, it says '{"error":"Configuration prevents the usage of this endpoint by unprivileged users"}', but that doesn't seem accurate, since disabling that system preference blocks the /public APIs in general, right? Even if you use a privileged user, it still doesn't work. Actually, even with RESTPublicAPI enabled, I can't get the /public endpoints to work. I get errors like this '{"error":"Authorization failure. Missing required permission(s).","required_permissions":null}'. This email is getting a bit long and I think I have a million other API problems, so I might just work through one by one and open Bugzilla tickets as I go. David Cook Systems Librarian Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Direct: 02 8005 0595 signature.asc Description: PGP signature ___ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] Email::MesageID module and koha-testing-docker
That `docker system prune -a` command could have unexpected consequences if you use Docker for anything other than koha-testing-docker. My suggestion is typically to fetch the latest koha-testing-docker git directory and to run "docker-compose pull" which will fetch the latest Docker images listed in the docker-compose.yml file. David Cook Systems Librarian Prosentient Systems 72/330 Wattle St Ultimo, NSW 2007 Australia Office: 02 9212 0899 Direct: 02 8005 0595 -Original Message- From: Koha-devel On Behalf Of Jon Knight Sent: Thursday, 12 March 2020 4:02 AM To: Koha Devel Subject: Re: [Koha-devel] Email::MesageID module and koha-testing-docker Just in case it helps, ashimema suggested on the IRC channel that I should run: `docker system prune -a` on the command line before firing up a docker container from the updated koha-testing-docker git directory. That worked a treat. Putting it here in case others trip over the same problem! Thank you! Jon From: Koha-devel on behalf of Jon Knight Sent: 11 March 2020 15:24 To: Koha Devel Subject: [Koha-devel] Email::MesageID module and koha-testing-docker I was going to do a spot of Koha "signing off" today whilst waiting for some other work to arrive and decided to try firing up the koha-testing-docker (https://gitlab.com/koha-community/koha-testing-docker.git) Docker image as the bug I was going to test needed command line interaction (for web based testing I usually use the sandboxes as its quicker and easier). Unfortunately I've come unstuck because I keep getting: koha_1 | Something went wrong rebuilding biblio indexes for kohadev koha_1 | Can't locate Email/MessageID.pm in @INC (you may need to install the Email::MessageID module) (@INC contains: /kohadevbox/koha /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /var/lib/koha/kohadev/plugins) at /kohadevbox/koha/Koha/Email.pm line 22. koha_1 | BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Email.pm line 22. koha_1 | Compilation failed in require at /kohadevbox/koha/C4/Letters.pm line 38. ...followed by lots of similar lines and a failed Koha install. I've tried pulling a fresh koha-testing-docker git install onto my laptop and setting/exporting the CPAN=1 environment variable to get CPAN dependencies updated but it still happens. I can `kshell` into the docker container and install the module manually, but of course its blown away the next time I do a `ku` or `kp` command to bring up a new container instance. Kind of puts a dampener on doing sign-offs, so does anyone else have the same issue and/or any hints on how to fix it? Jon ___ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/ ___ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/ signature.asc Description: PGP signature ___ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] Email::MesageID module and koha-testing-docker
Just in case it helps, ashimema suggested on the IRC channel that I should run: `docker system prune -a` on the command line before firing up a docker container from the updated koha-testing-docker git directory. That worked a treat. Putting it here in case others trip over the same problem! Thank you! Jon From: Koha-devel on behalf of Jon Knight Sent: 11 March 2020 15:24 To: Koha Devel Subject: [Koha-devel] Email::MesageID module and koha-testing-docker I was going to do a spot of Koha "signing off" today whilst waiting for some other work to arrive and decided to try firing up the koha-testing-docker (https://gitlab.com/koha-community/koha-testing-docker.git) Docker image as the bug I was going to test needed command line interaction (for web based testing I usually use the sandboxes as its quicker and easier). Unfortunately I've come unstuck because I keep getting: koha_1 | Something went wrong rebuilding biblio indexes for kohadev koha_1 | Can't locate Email/MessageID.pm in @INC (you may need to install the Email::MessageID module) (@INC contains: /kohadevbox/koha /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /var/lib/koha/kohadev/plugins) at /kohadevbox/koha/Koha/Email.pm line 22. koha_1 | BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Email.pm line 22. koha_1 | Compilation failed in require at /kohadevbox/koha/C4/Letters.pm line 38. ...followed by lots of similar lines and a failed Koha install. I've tried pulling a fresh koha-testing-docker git install onto my laptop and setting/exporting the CPAN=1 environment variable to get CPAN dependencies updated but it still happens. I can `kshell` into the docker container and install the module manually, but of course its blown away the next time I do a `ku` or `kp` command to bring up a new container instance. Kind of puts a dampener on doing sign-offs, so does anyone else have the same issue and/or any hints on how to fix it? Jon ___ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/ ___ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-devel] Email::MesageID module and koha-testing-docker
I was going to do a spot of Koha "signing off" today whilst waiting for some other work to arrive and decided to try firing up the koha-testing-docker (https://gitlab.com/koha-community/koha-testing-docker.git) Docker image as the bug I was going to test needed command line interaction (for web based testing I usually use the sandboxes as its quicker and easier). Unfortunately I've come unstuck because I keep getting: koha_1 | Something went wrong rebuilding biblio indexes for kohadev koha_1 | Can't locate Email/MessageID.pm in @INC (you may need to install the Email::MessageID module) (@INC contains: /kohadevbox/koha /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1 /usr/lib/x86_64-linux-gnu/perl5/5.24 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.24 /usr/share/perl/5.24 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base /var/lib/koha/kohadev/plugins) at /kohadevbox/koha/Koha/Email.pm line 22. koha_1 | BEGIN failed--compilation aborted at /kohadevbox/koha/Koha/Email.pm line 22. koha_1 | Compilation failed in require at /kohadevbox/koha/C4/Letters.pm line 38. ...followed by lots of similar lines and a failed Koha install. I've tried pulling a fresh koha-testing-docker git install onto my laptop and setting/exporting the CPAN=1 environment variable to get CPAN dependencies updated but it still happens. I can `kshell` into the docker container and install the module manually, but of course its blown away the next time I do a `ku` or `kp` command to bring up a new container instance. Kind of puts a dampener on doing sign-offs, so does anyone else have the same issue and/or any hints on how to fix it? Jon ___ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] Koha plugin development reference, Reg;
Hi, It is challenging indeed. I suggest you have a look at existing plugins. For example if you want to create a template and some perl code for tools : https://github.com/biblibre/koha-plugin-users-with-permissions Best regards, Le 09/03/2020 à 13:52, Anuj Singh a écrit : Dear Koha Developers, Please suggest me how can I develop koha plugin. I'm very new in Koha Development, please help me to start from the beginning. I tried to search on https://wiki.koha-community.org/wiki/Koha_plugin_development_reference URL but sufficient documentation is not available. Also, I request to suggest me some useful resources and learning material for the same. Thanks & Regards --Anuj ___ Koha-devel mailing listHi Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/ -- Fridolin SOMERS Software and system maintainer 濾 BibLibre, France ___ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
Re: [Koha-devel] Koha packaging problems (Deb10/Buster)
On 10/03/20 8:08 pm, Mason James wrote: > Hi Koha devs > > We have a dependency problem with the release of debian-10 and the following > packages. (debian-11 is ok) > > libmojolicious-perl > libmojolicious-plugin-openapi-perl > libyaml-libyaml-perl > Two other options... > 1/ use kc.org debian packages, with cpanminus (or similar) providing the > distro specific packages (extra installation steps and complexity) > 2/ ignore the problem for now, and accept that older koha/distro > combinations will be forced to break some other points i didnt mention... koha on buster has a security bug. the solution requires some packages to be updated i can push the packages to the koha repo to fix this problem, but... (there's always a but) the new packages will break jessie :/ when jessie-lts support officially finishes on 30th june 2020, i can happily push these packages - but between now and 30th june we need to decide on a fix for the security bug on buster https://wiki.debian.org/LTS some other options... 3/ do nothing and tell people to not use buster, until june 4/ provide buster packages in an separate repo, until june 5/ provide instructions to add buster packages using cpanm, until june 6/ update koha repo to fix buster, and provide jessie packages in an separate repo 7/ update koha repo to fix buster, and provide instructions to add jessie packages using cpanm 8/ submit required buster packages to debian buster-backports repo (not sure how difficult this is) i prefer option 4/, as its the least disruptive for users, and only requires an extra sources.list line to implement also... i think we should hold off on redesigning the koha apt repository until *after* this buster security issue is fixed cheers, Mason ___ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/