Bug 26331

Summary: svc/letters/preview is not executable which prevents CGI functioning
Product: Koha Reporter: David Cook <dcook>
Component: Architecture, internals, and plumbingAssignee: David Cook <dcook>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: aleisha, fridolin.somers, jonathan.druart, lucas, martin.renvoize, victor
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26384
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26382
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.04, 19.11.10
Attachments: Bug 26331: Make svc/letters/preview executable
Bug 26331: Make svc/letters/preview executable
Bug 26331: Make svc/letters/preview executable

Description David Cook 2020-09-01 05:18:54 UTC
svc/leters/preview is not marked as executable, so it will generate a 500 error when running in CGI.
Comment 1 David Cook 2020-09-01 05:21:22 UTC
Created attachment 109387 [details] [review]
Bug 26331: Make svc/letters/preview executable

Without this patch, you can't preview letters when running Koha in CGI mode.

To test:
1. Run Koha as CGI (and not Plack)
2. Go to /cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=circulation&code=CHECKIN
3. Try to preview the notice (using a valid barcode)
4. Note in the browser console that svc/letters/preview is generating a 500 error
Comment 2 Fridolin Somers 2020-09-03 08:16:50 UTC
Created attachment 109581 [details] [review]
Bug 26331: Make svc/letters/preview executable

Without this patch, you can't preview letters when running Koha in CGI mode.

To test:
1. Run Koha as CGI (and not Plack)
2. Go to /cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=circulation&code=CHECKIN
3. Try to preview the notice (using a valid barcode)
4. Note in the browser console that svc/letters/preview is generating a 500 error

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 3 Fridolin Somers 2020-09-03 08:17:45 UTC
Trivial ;)
Looks like its the only file missing permission :
find svc -not -perm -755
Comment 4 Martin Renvoize 2020-09-03 09:04:21 UTC
Created attachment 109594 [details] [review]
Bug 26331: Make svc/letters/preview executable

Without this patch, you can't preview letters when running Koha in CGI mode.

To test:
1. Run Koha as CGI (and not Plack)
2. Go to /cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=circulation&code=CHECKIN
3. Try to preview the notice (using a valid barcode)
4. Note in the browser console that svc/letters/preview is generating a 500 error

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2020-09-03 09:04:43 UTC
Good catch, trivial patch.. Passing QA
Comment 6 Jonathan Druart 2020-09-03 13:05:10 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 7 Lucas Gass 2020-09-14 21:26:30 UTC
backported to 20.05.x for 20.05.04
Comment 8 Aleisha Amohia 2020-09-15 11:39:30 UTC
backported to 19.11.x for 19.11.10
Comment 9 Victor Grousset/tuxayo 2020-09-20 19:19:39 UTC
Not backported to oldoldstable (19.05.x). Feel free to ask if it's needed.