Bug 19977 - Local Use tab in systempreferences tries to open text editor's temporary files, and die
Summary: Local Use tab in systempreferences tries to open text editor's temporary file...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Julian Maurice
QA Contact: Nick Clemens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-16 09:19 UTC by Julian Maurice
Modified: 2019-10-14 19:57 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19977: Open only .pref files in Local Use tab (sysprefs) (1.06 KB, patch)
2018-01-16 09:23 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 19977: Open only .pref files in Local Use tab (sysprefs) (1.11 KB, patch)
2018-01-18 17:54 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 19977: Open only .pref files in Local Use tab (sysprefs) (1.16 KB, patch)
2018-01-19 14:54 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2018-01-16 09:19:26 UTC
Steps to reproduce:
1. Open koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref with vim (check that it creates a .circulation.pref.swp in the same directory)
2. Go to the "Local Use" tab in admin/systempreferences.pl
3. Observe the error: Can't use string ("b0VIM 8.0") as a HASH ref while "strict refs" in use at /home/koha/koha/admin/systempreferences.pl line 413.
Comment 1 Julian Maurice 2018-01-16 09:23:53 UTC
Created attachment 70548 [details] [review]
Bug 19977: Open only .pref files in Local Use tab (sysprefs)

Test plan:
1. Open .../prog/en/modules/admin/preferences/circulation.pref
with vim (check that it creates a .circulation.pref.swp in the same
directory)
2. Go to the "Local Use" tab in admin/systempreferences.pl
3. Confirm that the page works normally
Comment 2 Mark Tompsett 2018-01-18 17:48:47 UTC
One would hope this case never happens. And if it does, stop editing the files on a live system. That being said, this is a straight-forward regexp tightening.
Comment 3 Mark Tompsett 2018-01-18 17:54:24 UTC
Created attachment 70703 [details] [review]
Bug 19977: Open only .pref files in Local Use tab (sysprefs)

Test plan:
1. Open .../prog/en/modules/admin/preferences/circulation.pref
with vim (check that it creates a .circulation.pref.swp in the same
directory)
2. Go to the "Local Use" tab in admin/systempreferences.pl
3. Confirm that the page works normally

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 4 Julian Maurice 2018-01-19 11:03:04 UTC
(In reply to M. Tompsett from comment #2)
> One would hope this case never happens. And if it does, stop editing the
> files on a live system. That being said, this is a straight-forward regexp
> tightening.

Of course this should never happen in production, but it can be annoying during development.
Thanks for the sign-off!
Comment 5 Nick Clemens 2018-01-19 14:54:01 UTC
Created attachment 70749 [details] [review]
Bug 19977: Open only .pref files in Local Use tab (sysprefs)

Test plan:
1. Open .../prog/en/modules/admin/preferences/circulation.pref
with vim (check that it creates a .circulation.pref.swp in the same
directory)
2. Go to the "Local Use" tab in admin/systempreferences.pl
3. Confirm that the page works normally

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Jonathan Druart 2018-01-19 18:56:36 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 7 Nick Clemens 2018-01-23 04:11:20 UTC
Awesome work all!

Pushed to Stable for 17.11.02
Comment 8 Fridolin Somers 2018-01-31 07:55:54 UTC
Pushed to 17.05.x for v17.05.09