To reproduce: Go to Home > Tools > Patron card creator Click on 'Manage profiles' Result: Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/share/kohaclone/C4/Creators/Lib.pm line 564. Reason: Select statment to get field 'template code' from table 'club_template_enrollment_fields' (!) instead of 'table creator_templates'.
Created attachment 38830 [details] [review] Bug 14143 - Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields) To reproduce: Go to Home > Tools > Patron card creator Click on 'Manage profiles' Result: Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/share/kohaclone/C4/Creators/Lib.pm line 564. Reason: Select statment to get field 'template code' from table 'club_template_enrollment_fields' (!) instead of 'table creator_templates'. To test: Apply patch Try to reproduce issue.
Note: This is kind of prospective patch, it appeared after testing Bug 12461 - Add patron clubs feature No changes for Bug 12461 needed though, the reason of the ambiguity waited in C4/Creators/Lib.pm
Comment on attachment 38830 [details] [review] Bug 14143 - Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields) Review of attachment 38830 [details] [review]: ----------------------------------------------------------------- ::: C4/Creators/Lib.pm @@ +559,4 @@ > next POPULATE_ROW; > } > elsif ($table_column =~ m/^_((.*)_(.*$))/) { # this a special case > + my $table_name = get_table_names('creator-'.$2); #Bug 14143 fix to remove ambiguity with table 'club_template_enrollment_fields' underscore, not hypen. :)
Created attachment 39524 [details] [review] Bug 14143 - Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields) To reproduce: Go to Home > Tools > Patron card creator Click on 'Manage profiles' Result: Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/share/kohaclone/C4/Creators/Lib.pm line 564. Reason: Select statment to get field 'template code' from table 'club_template_enrollment_fields' (!) instead of 'table creator_templates'. To test: Apply patch Try to reproduce issue. Amended because of typo (_ instead of -)
This depends on 12461, it's needed to test it, but is FQA
Tried to test this, but 12461 needs a rebase (and QA fixes). We should have a »patch this is depending on does not apply« status. :P
Blocked.
Still valid on top of Bug 12461
Created attachment 62819 [details] [review] Bug 14143 - Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields) To reproduce: Go to Home > Tools > Patron card creator Click on 'Manage profiles' Result: Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/share/kohaclone/C4/Creators/Lib.pm line 564. Reason: Select statment to get field 'template code' from table 'club_template_enrollment_fields' (!) instead of 'table creator_templates'. To test: Apply patch Try to reproduce issue. Amended because of typo (_ instead of -) Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 17.05, thanks Marc!
Dependency bug 12461 is not part of 16.11.x.