Bug 14481 - Warns when setting permissions for patron
Summary: Warns when setting permissions for patron
Status: RESOLVED DUPLICATE of bug 15542
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-01 05:19 UTC by Aleisha Amohia
Modified: 2016-01-11 09:29 UTC (History)
6 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 14481: Silences warns triggered when setting patron permissions (1.07 KB, patch)
2015-07-01 05:23 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 14481: Warns when setting permissions for patron (1.18 KB, patch)
2015-12-14 22:27 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 14481: Warns when setting permissions for patron (1.38 KB, patch)
2015-12-16 13:02 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2015-07-01 05:19:14 UTC
To recreate warns, go to any patron and click More --> Set permissions (ie follow this link http://localhost:8081/cgi-bin/koha/members/member-flags.pl?member=1369)

member-flags.pl: Use of uninitialized value $roadtype in concatenation (.) or string at /home/vagrant/kohaclone/members/member-flags.pl line 176
member-flags.pl: Use of uninitialized value $roadtype in concatenation (.) or string at /home/vagrant/kohaclone/members/member-flags.pl line 176
Comment 1 Aleisha Amohia 2015-07-01 05:23:26 UTC Comment hidden (obsolete)
Comment 2 Nick Clemens (kidclamp) 2015-07-19 02:00:03 UTC
I get less warns but still one:
[Sat Jul 18 21:56:11.743502 2015] [cgi:error] [pid 13693] [client 127.0.0.1:37991] AH01215: [Sat Jul 18 21:56:11 2015] member-flags.pl: Use of uninitialized value in concatenation (.) or string at /home/nick/kohaclone/members/member-flags.pl line 177., referer: http://localhost:8080/cgi-bin/koha/members/moremember.pl?borrowernumber=19
Comment 3 Aleisha Amohia 2015-12-14 22:27:24 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2015-12-16 13:02:39 UTC
Created attachment 45722 [details] [review]
[SIGNED-OFF] Bug 14481: Warns when setting permissions for patron

Use of uninitialized value $roadtype

To test:
1) Go to any patron page and click More --> Set permissions (or follow
   this link -->
   http://localhost:8081/cgi-bin/koha/members/member-flags.pl?member=1369)
2) Notice the warns
3) Apply patch and reload page
4) Notice warns are gone and page still works correctly

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

This patch successfully eliminates the 'Use of uninitialized value
$roadtype' error in the log.
Comment 5 Jonathan Druart 2015-12-18 11:51:16 UTC
I have not tested, but it cannot work.
It will remove the warning, but $roadtype won't be interpret as a variable but as a string :)
The consequence is that the address displayed will be "12 $roadtype patron address"
Comment 6 Aleisha Amohia 2015-12-20 20:15:45 UTC
Is it possible we could just remove $roadtype from the details page? I tested having information in every address field and it didn't appear to use $roadtype until I clicked Set permissions. Where does $roadtype actually get used here?
Comment 7 Katrin Fischer 2015-12-20 21:05:55 UTC
$roadtype might only appear if you have the authorized value for it set up - it's an older feature that was moved into a system preference a few versions ago. It gives you a pull down for the 'road type' for patron's addresses.
Comment 8 Aleisha Amohia 2015-12-20 21:21:21 UTC
Which syspref Katrin? I can't seem to see it
Comment 9 Katrin Fischer 2015-12-21 07:16:45 UTC
Ah sorry... I meant an authorised value... try adding something like:
ROADTYPE -  S -  Street. When you check your edit patron screen then, it should have changed.
Comment 10 Aleisha Amohia 2016-01-10 22:39:26 UTC
So this warn only shows up when no authorized value has been chosen for roadtype. I've found ways to make the warn disappear, but then it doesn't display the roadtype in the address where it should. Any suggestions for a patch?
Comment 11 Jonathan Druart 2016-01-11 08:55:11 UTC
I am not sure it makes sense to remove this warning, it happens if there is a configuration issue.
Moreover, there is something wrong with the display of the roadtype in the address. I am going to open a bug report.
Comment 12 Jonathan Druart 2016-01-11 09:29:52 UTC
This warning will be removed by bug 15542.

*** This bug has been marked as a duplicate of bug 15542 ***