Uploaded file "not found" in staff client
Hi We configured Koha to upload files, e. g. a PDF file is uploaded onto thehost running Koha via MARC field 856 $u: first selected, then uploaded, then chosen, so field 856 $u is filled with the following: /cgi-bin/koha/opac-retrieve-file.pl?id=5228ccd12bb0d5f002c804effe0680fe The PDF file then is visible in table "uploaded_files" as well as in directory "/var/lib/koha/<instancename>/uploads/koha_upload". In the OPAC when clicking on link "Click here to access online" the file is showing up all right. When clicking the respective link in the staff client, instead of the file there appears a white screen saying "not found". We have tested this in Koha 18.11 and 19.05. Is there something more to configure or is this maybe a bug? Best wishes: Michael -- Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz T 0041 (0)61 261 55 61 · E mik@adminkuhn.ch · W www.adminkuhn.ch
Hi Michael, are the OPACBaseURL and StaffClientBaseURL configured correctly? If yes, what is the URL of the "not found" page? Caroline On 19-09-05 10 h 53, Michael Kuhn wrote:
Hi
We configured Koha to upload files, e. g. a PDF file is uploaded onto thehost running Koha via MARC field 856 $u: first selected, then uploaded, then chosen, so field 856 $u is filled with the following:
/cgi-bin/koha/opac-retrieve-file.pl?id=5228ccd12bb0d5f002c804effe0680fe
The PDF file then is visible in table "uploaded_files" as well as in directory "/var/lib/koha/<instancename>/uploads/koha_upload". In the OPAC when clicking on link "Click here to access online" the file is showing up all right.
When clicking the respective link in the staff client, instead of the file there appears a white screen saying "not found".
We have tested this in Koha 18.11 and 19.05. Is there something more to configure or is this maybe a bug?
Best wishes: Michael
-- Caroline Cyr La Rose, M.L.I.S. Librarian | Product Manager Phone: 1-833-465-4276, ext. 221 Caroline.Cyr-La-Rose@inLibro.com <mailto:caroline.cyr-la-rose@inLibro.com> INLiBRO | Document Technologies Specialists | www.inLibro.com <http://www.inLibro.com>
Hi Caroline
are the OPACBaseURL and StaffClientBaseURL configured correctly? If yes, what is the URL of the "not found" page?
Initially both preferences were empty. But even if empty, in the OPAC the PDF can be viewed. See: http://koha.adminkuhn.ch/cgi-bin/koha/opac-detail.pl?biblionumber=467 while the URL to the file is: http://koha.adminkuhn.ch/cgi-bin/koha/opac-retrieve-file.pl?id=5228ccd12bb0d... I have now filled "staffClientBaseURL" with "http://koha.adminkuhn.ch:8080" and have restarted Memcache, Apache HTTP Server and Koha. Still the staff client shows "not found". See: http://koha.adminkuhn.ch:8080/cgi-bin/koha/catalogue/detail.pl?biblionumber=... (username and password for the staff client are both "demo") Here the URL to the file is the following (and it was the same before changing "staffClientBaseURL"): http://koha.adminkuhn.ch:8080/cgi-bin/koha/opac-retrieve-file.pl?id=5228ccd1... Somehow it seems to me like the URL part "opac-retrieve-file.pl" is not correct for the staff client... thus a bug? Best wishes: Michael -- Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz T 0041 (0)61 261 55 61 · E mik@adminkuhn.ch · W www.adminkuhn.ch
Hi Michael, you should always set both *BaseURL preferences, as they make things like the links from staff to OPAC, link in RSS feeds, etc. work. I think you might see this bug: *Bug 23423* <https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23423> - Online resource links which are OPAC retrieve file references are not correctly formatted in the OPAC detail view We have discussed on IRC that 856$u should always be a full URL, not a relative URL. - But there has been a change in behavior caused by bug 21887. Hope this helps, Katrin On 05.09.19 18:00, Michael Kuhn wrote:
Hi Caroline
are the OPACBaseURL and StaffClientBaseURL configured correctly? If yes, what is the URL of the "not found" page?
Initially both preferences were empty. But even if empty, in the OPAC the PDF can be viewed. See:
http://koha.adminkuhn.ch/cgi-bin/koha/opac-detail.pl?biblionumber=467
while the URL to the file is:
http://koha.adminkuhn.ch/cgi-bin/koha/opac-retrieve-file.pl?id=5228ccd12bb0d...
I have now filled "staffClientBaseURL" with "http://koha.adminkuhn.ch:8080" and have restarted Memcache, Apache HTTP Server and Koha. Still the staff client shows "not found". See:
http://koha.adminkuhn.ch:8080/cgi-bin/koha/catalogue/detail.pl?biblionumber=...
(username and password for the staff client are both "demo")
Here the URL to the file is the following (and it was the same before changing "staffClientBaseURL"):
http://koha.adminkuhn.ch:8080/cgi-bin/koha/opac-retrieve-file.pl?id=5228ccd1...
Somehow it seems to me like the URL part "opac-retrieve-file.pl" is not correct for the staff client... thus a bug?
Best wishes: Michael
Hi Kathrin
you should always set both *BaseURL preferences, as they make things like the links from staff to OPAC, link in RSS feeds, etc. work.
Thanks for the hint! In fact even without these preferences set, the URL to the uploaded file does still work in the OPAC. But the link to the uploaded file in the staff client will only work, if "OPACBaseURL" is set! However, the preference "staffClientBaseURL" doesn't seem to have any effect under these circumstances. Somewhat confusing. I have now set both preferences "OPACBaseURL" and "staffClientBaseURL" as you suggested. Best wishes: Michael -- Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz T 0041 (0)61 261 55 61 · E mik@adminkuhn.ch · W www.adminkuhn.ch
participants (3)
-
Caroline Cyr-La-Rose -
Katrin Fischer -
Michael Kuhn