[Bug 21289] New: Error when sending emails to partner libraries

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] New: Error when sending emails to partner libraries

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

            Bug ID: 21289
           Summary: Error when sending emails to partner libraries
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: ILL
          Assignee: [hidden email]
          Reporter: [hidden email]

During the "Place request with partners" workflow, at the point of sending the
request mail, an "Internal server error" is displayed and the following is
logged:

Can't call method "isa" on unblessed reference at
/home/koha/kohaclone/ill/ill-requests.pl line 241.

The error here is misleading. It is due to the 'catch' block being called
without an instance of a Koha::Exceptions::Ill object being passed. The reason
it is being called is that the handle_commit_maybe sub is being called inside
it. The handle_commit_maybe sub redirects the client, the exits:

295             # Redirect to a view of the newly created request
296             print $cgi->redirect(
297                
'/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id='.
298                 $request->id
299             );
300             exit;

This is correct, but because it is being called inside the try block, the
"exit" causes the catch block to be called, despite the client being
redirected.

A patch for this should move the call to handle_commit_maybe outside of the try
block, we will still only reach it if everything inside the try block
succeeded.

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

Andrew Isherwood <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

Andrew Isherwood <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]-commun |andrew.isherwood@ptfs-europ
                   |ity.org                     |e.com

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

Andrew Isherwood <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Patch complexity|---                         |Trivial patch
             Status|ASSIGNED                    |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

--- Comment #1 from Andrew Isherwood <[hidden email]> ---
Created attachment 78309
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78309&action=edit
Bug 21289: Fix "isa" bug during partner request

We cannot call 'handle_commit_maybe' inside a 'try' block.
handle_commit_maybe redirects the client then calls 'exit', this is
interpreted as an error and the 'catch' block is erroneously called.

This patch moves the calling of 'handle_commit_maybe' outside the try
block, it will only be reached if everything inside the try block
suceeds.

To test:
1) Enable ILL and have the FreeForm backend available
2) Create a patron category to hold ILL "partners" to whom requests can
be sent. The category can be called anything, you should note the code
you assign
3) Create a patron that belongs to your new category, the patron must
have a primary email defined.
4) In your <interlibrary_loans> block in koha-conf.xml, ensure you have
a <partner_code> element, it should contain the code you assigned in
step 2
5) Create an ILL request using the FreeForm backend
6) Once the request is created, select the "Place request with partners"
button
7) Select your "partner" from the "Select partner libraries" box
8) Click "Send email"
9) TEST: Observe no errors are displayed in the UI

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

Michal Denar <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

PTFS Europe Sandboxes <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

PTFS Europe Sandboxes <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #78309|0                           |1
        is obsolete|                            |

--- Comment #2 from PTFS Europe Sandboxes <[hidden email]> ---
Created attachment 79380
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79380&action=edit
Bug 21289: Fix "isa" bug during partner request

We cannot call 'handle_commit_maybe' inside a 'try' block.
handle_commit_maybe redirects the client then calls 'exit', this is
interpreted as an error and the 'catch' block is erroneously called.

This patch moves the calling of 'handle_commit_maybe' outside the try
block, it will only be reached if everything inside the try block
suceeds.

To test:
1) Enable ILL and have the FreeForm backend available
2) Create a patron category to hold ILL "partners" to whom requests can
be sent. The category can be called anything, you should note the code
you assign
3) Create a patron that belongs to your new category, the patron must
have a primary email defined.
4) In your <interlibrary_loans> block in koha-conf.xml, ensure you have
a <partner_code> element, it should contain the code you assigned in
step 2
5) Create an ILL request using the FreeForm backend
6) Once the request is created, select the "Place request with partners"
button
7) Select your "partner" from the "Select partner libraries" box
8) Click "Send email"
9) TEST: Observe no errors are displayed in the UI

Signed-off-by: Barry Cannon <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Passed QA

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #79380|0                           |1
        is obsolete|                            |

--- Comment #3 from Jonathan Druart <[hidden email]> ---
Created attachment 79663
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79663&action=edit
Bug 21289: Fix "isa" bug during partner request

We cannot call 'handle_commit_maybe' inside a 'try' block.
handle_commit_maybe redirects the client then calls 'exit', this is
interpreted as an error and the 'catch' block is erroneously called.

This patch moves the calling of 'handle_commit_maybe' outside the try
block, it will only be reached if everything inside the try block
suceeds.

To test:
1) Enable ILL and have the FreeForm backend available
2) Create a patron category to hold ILL "partners" to whom requests can
be sent. The category can be called anything, you should note the code
you assign
3) Create a patron that belongs to your new category, the patron must
have a primary email defined.
4) In your <interlibrary_loans> block in koha-conf.xml, ensure you have
a <partner_code> element, it should contain the code you assigned in
step 2
5) Create an ILL request using the FreeForm backend
6) Once the request is created, select the "Place request with partners"
button
7) Select your "partner" from the "Select partner libraries" box
8) Click "Send email"
9) TEST: Observe no errors are displayed in the UI

Signed-off-by: Barry Cannon <[hidden email]>

Signed-off-by: Jonathan Druart <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
             Status|Passed QA                   |Pushed to Master

--- Comment #4 from Nick Clemens <[hidden email]> ---
Awesome work all!

Pushed to master for 18.11

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

Martin Renvoize <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martin.renvoize@ptfs-europe
                   |                            |.com
             Status|Pushed to Master            |Pushed to Stable

--- Comment #5 from Martin Renvoize <[hidden email]> ---
Pushed to 18.05.x for 18.05.05

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21289] Error when sending emails to partner libraries

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289

Fridolin SOMERS <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
                   |                            |m

--- Comment #6 from Fridolin SOMERS <[hidden email]> ---
Pushed to 17.11.x for 17.11.11

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/