Fields with underscore like B_address do not print on patron cards. To reproduce: - Create patron card layout using fields with underscore in their name (e.g. <surname><B_address> ) - Print (export) patron card - Verify that fields without underscore are replaced by their value, but fields with underscore do not replace but show the field name
Created attachment 60984 [details] [review] Bug 18244: Patron card creator does not take in account fields with underscore (B_address etc.) Fields with underscore like B_address do not print on patron cards. To reproduce: - Create patron card layout using fields with underscore in their name (e.g. <surname><B_address> ) - Print (export) patron card - Verify that fields without underscore are replaced by their value, but fields with underscore do not replace but show the field name To test: - Apply patch - Try to reproduce and verify that fields with underscore are replace as expected
I have applied the patch on two different computers, confirmed the changes in the patch, but I see no difference. I still get the field name instead of the value.
Created attachment 61590 [details] Patron card layout settings to test B_address (In reply to Christopher Brannon from comment #2) > I have applied the patch on two different computers, confirmed the changes > in the patch, but I see no difference. I still get the field name instead > of the value. I re-tested with the settings for a test layout, see screenshot attached. Field <B_address> displays it's contents as expected. - What are your settings? - Restart Plack?
I've cleared cache, restarted apache2, restarted memcache, restarted all (restart_all), no luck. I'm using the demo layout that installed with Koha, and just editing the 2nd field to read "Address: <B_address>" I go to manage Card batches and on my one patron I click Export. When I open the pdf, I still see <B_address>. I will attach my screen shots.
Created attachment 61591 [details] My card layout
Created attachment 61592 [details] My card export with field name showing
Created attachment 61611 [details] Re-testing same settings as in screenshot comment #5 (In reply to Christopher Brannon from comment #4) > I've cleared cache, restarted apache2, restarted memcache, restarted all > (restart_all), no luck. > > I'm using the demo layout that installed with Koha, and just editing the 2nd > field to read "Address: <B_address>" > > I go to manage Card batches and on my one patron I click Export. When I > open the pdf, I still see <B_address>. > > I will attach my screen shots. I repeated with your settings, it works as expected (see screenshot attached). After taking the screenshots, I tested with other B_-fields as well, e.g. <B_city>, they display as expected. It did not work immediately after applying the patch, I had to re-start Plack and to reload the page for batch management. Tested with single export and with export of entire batch. Hmm, where is the difference...?
> I repeated with your settings, it works as expected (see screenshot > attached). After taking the screenshots, I tested with other B_-fields as > well, e.g. <B_city>, they display as expected. > > It did not work immediately after applying the patch, I had to re-start > Plack and to reload the page for batch management. Tested with single export > and with export of entire batch. > > Hmm, where is the difference...? Don't know. I've tried everything I know. Don't know why loading a patch should be this difficult. I even tried another browser. If it is sticking anywhere, it is on the server side, not the browser, since the change is not reflected in a new browser. I'll keep beating up on it.
Are you testing the patch on a dedicated test server, or are you using kohadevbox?
Not kohadevbox. It's a VM with an install from packets that I gitified. Current version is 16.12.00.015 Just an idea because I remember a similar situation: What happens if you edit the patched C4/Patroncards/Patroncard.pm file and intentionally insert some errors in order to make it crash? - Can you provoke the crash or does export still behave as before?
Throwing stray text into the file you patched doesn't seem to effect anything. I know my test environment is working, as I can apply another patch and see the effects of it right away. We're missing something.
Created attachment 61629 [details] [review] [SIGNED OFF] Bug 18244: Patron card creator does not take in account fields with underscore (B_address etc.) Fields with underscore like B_address do not print on patron cards. To reproduce: - Create patron card layout using fields with underscore in their name (e.g. <surname><B_address> ) - Print (export) patron card - Verify that fields without underscore are replaced by their value, but fields with underscore do not replace but show the field name To test: - Apply patch - Try to reproduce and verify that fields with underscore are replace as expected Works as expected. Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Note to kohadevbox testers: disable plack. Kohadevbox is not pointing to all the files in the kohaclone environment with plack enabled. This is an issue with kohadevbox, not the patch.
Created attachment 61701 [details] [review] Bug 18244: Patron card creator does not take in account fields with underscore (B_address etc.) Fields with underscore like B_address do not print on patron cards. To reproduce: - Create patron card layout using fields with underscore in their name (e.g. <surname><B_address> ) - Print (export) patron card - Verify that fields without underscore are replaced by their value, but fields with underscore do not replace but show the field name To test: - Apply patch - Try to reproduce and verify that fields with underscore are replace as expected Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 17.05, thanks Marc!
This patch has been pushed to 16.11.x and will be in 16.11.07.
Pushed to 3.22.x for 3.22.20
Pushed to 16.05.x, for 16.05.12 release