Bug 6750

Summary: Guarantor search broken on translated templates
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: I18N/L10NAssignee: Frédéric Demians <f.demians>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: critical    
Priority: PATCH-Sent (DO NOT USE) CC: chris, paul.poulain
Version: Main   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/members/guarantor_search.pl?category_type=C
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed patch
[SIGNED-OFF] Bug 6750 Guarantor search broken on translated templates

Description Katrin Fischer 2011-08-19 08:06:45 UTC
To reproduce:

0) Select a language != English
1) Add new child patron
2) Click on 'Set to patron'

New window for guarantor search opens with following error message:

'Software error:

Template process failed: file error - parse error - /home/koha/kohaclone/koha-tmpl/intranet-tmpl/prog/de-DE/modules/members/guarantor_search.tt line 83: unexpected token (=)
  [% "'[%" |replace('\n',="|replace('\n'," |replace('\r',="|replace('\r'," '\\r')="'\\r')" resultsloo.zipcode="resultsloo.zipcode" resultsloo.address2="resultsloo.address2" resultsloo.city="resultsloo.city" '\\n')="'\\n')" '",="'"," resultsloo.firstname="resultsloo.firstname" resultsloo.streetnumber="resultsloo.streetnumber" value="Auswählen" resultsloo.address="resultsloo.address" %] at /home/koha/kohaclone/C4/Templates.pm line 119.

For help, please send mail to the webmaster (webmaster@koha-dev), giving this error message and the time and date of the error. 

Problem exists in master and 3.4.3. Tested with German and French.
Comment 1 Frédéric Demians 2011-09-01 08:23:22 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2011-09-02 05:35:12 UTC
Created attachment 5272 [details] [review]
[SIGNED-OFF] Bug 6750 Guarantor search broken on translated templates

Fix the JavaScript to avoid implementing complex string substitution into JS
function call. This patch solves the bug and keep the ability to copy
borrower's address, name, etc., containing new line, simple quote, etc.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 3 Chris Cormack 2011-09-07 09:01:00 UTC
js changes, pushed please test
Comment 4 Chris Nighswonger 2011-10-26 18:02:07 UTC
The fix for this bug was published in the 3.4.5 release. If you were the reporter of this bug, please take time to verify the fix and update the status of this bug report accordingly. If the bug is fixed to your satisfaction, please close this report.