When performing a standard (or single) install, Makefile.PL generates an koha-httpd.conf with a hardcoded ../api/$1/app.pl reference. This error causes all REST api routes to fail in a standard/single install context. GET fails with 404, PUT fails with 403. The hard-coded path is correct in the dev context. Switching from an Apache variable to a Makefile variable, and hence replacing the hardcoded ../api bit of the path should fix this. Alex
Created attachment 60700 [details] [review] Bug 18175: Use Makefile variable for api path. * etc/koha-httpd.conf: Use __API_CGI_DIR__ instead of %{DOCUMENT_ROOT}/../api. Test plan: Confirming the problem: - Do a standard install of Koha - Test any REST API route. - The route will error out. Confirming the resolution: - Apply this patch. - Do a standard install of Koha - Test any REST API route. - The route will work. Confirming no regression: - Apply this patch. - Do a dev install of Koha - Test any REST API route. - The route will work.
Hi there Sorry this patch is not applying cleanly on master (as the below output shows), can you please either rebase the patch or define the Koha version this patch should be used on? Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 18175: Use Makefile variable for api path. Using index info to reconstruct a base tree... M etc/koha-httpd.conf Falling back to patching base and 3-way merge... Auto-merging etc/koha-httpd.conf CONFLICT (content): Merge conflict in etc/koha-httpd.conf Failed to merge in the changes. Patch failed at 0001 Bug 18175: Use Makefile variable for api path. The copy of the patch that failed is found in: /home/vagrant/kohaclone/.git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-18175-Use-Makefile-variable-for-api-path-cy4MsZ.patch Cheers, Alex
I 'think' this problem has gone away now.. going to mark as resolved.
(In reply to Martin Renvoize from comment #3) > I 'think' this problem has gone away now.. going to mark as resolved. I think we fixed it with https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21031.