Bug 7488

Summary: Errors with logs about moremember.pl / Messaging.pm
Product: Koha Reporter: Adrien SAURAT <adrien.saurat>
Component: Architecture, internals, and plumbingAssignee: Adrien SAURAT <adrien.saurat>
Status: CLOSED INVALID QA Contact: Ian Walls <koha.sekjal>
Severity: minor    
Priority: P5 - low CC: chris, jcamins, jonathan.druart
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: proposed patch

Description Adrien SAURAT 2012-02-01 15:07:25 UTC
When accessing a borrower detail page, the following lines appear in the logs:

[Wed Feb  1 15:55:44 2012] moremember.pl: Use of uninitialized value in concatenation (.) or string at /home/asaurat/workspace/versions/community/C4/Members/Messaging.pm line 216.
[Wed Feb  1 15:55:44 2012] moremember.pl: Use of uninitialized value in concatenation (.) or string at /home/asaurat/workspace/versions/community/C4/Members/Messaging.pm line 216.
[Wed Feb  1 15:55:44 2012] moremember.pl: Use of uninitialized value in concatenation (.) or string at /home/asaurat/workspace/versions/community/C4/Members/Messaging.pm line 216.
Comment 1 Adrien SAURAT 2012-02-01 15:12:56 UTC
Created attachment 7411 [details] [review]
proposed patch
Comment 2 Adrien SAURAT 2012-02-01 15:17:05 UTC
Comment on attachment 7411 [details] [review]
proposed patch

Proposed a very simple patch with minimal consequences. It will correct the bug and nothing more.

But maybe we could go further, if the 'transport_X' is not mandatory it may be better to avoid sending anything when the 'message_transport_type' is not defined (NULL in DB).
Comment 3 Ian Walls 2012-02-03 23:53:33 UTC
Can you provide a test case where message_transport_type would be undefined?  Under what circumstances is this allowed? 

It doesn't seem logical to me (at first blush) that this should come up under any normal usage scenario, so finding the root of the problem and fixing it there may be a better course of action, rather than chasing down manifestations like this.
Comment 4 Jared Camins-Esakov 2012-03-10 16:45:28 UTC
I cannot reproduce this error. Could you explain the steps to reproduce?
Comment 5 Jonathan Druart 2012-04-06 12:22:15 UTC
Adrien,
I have got the same problem on my install. I don't know why. Execute queries in installer/data/mysql/.../sample_notices_message_transports.sql to populate your message_transports table.
It should fix these warnings.
Comment 6 Jared Camins-Esakov 2012-05-13 11:47:08 UTC
(In reply to comment #5)
> Adrien,
> I have got the same problem on my install. I don't know why. Execute queries
> in installer/data/mysql/.../sample_notices_message_transports.sql to
> populate your message_transports table.
> It should fix these warnings.

Jonathan,

Does that mean that this bug should be marked INVALID or WONTFIX?
Comment 7 Adrien SAURAT 2012-05-22 11:48:47 UTC
With a message_transport table fully populated, the logs are indeed ok.
Don't know yet why I didn't have all the lines, though.

I close this bug.