Summary: | Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields | ||
---|---|---|---|
Product: | Koha | Reporter: | Marc Véron <veron> |
Component: | Label/patron card printing | Assignee: | Marc Véron <veron> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | bgkriegel, gmcharlt, jonathan.druart, kyle.m.hall, kyle, mirko |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 12461 | ||
Bug Blocks: | |||
Attachments: |
Bug 14143 - Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields)
Bug 14143 - Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields) Bug 14143 - Patron cards: Crash (confusion between table names creator_templates and club_template_enrollment_fields) |
Description
Marc Véron
2015-05-04 21:21:14 UTC
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. 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. |