The new Add to My List menu options don't work in TPAC in the Staff Client

Bug #1052941 reported by Jason Stephenson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.3
Fix Released
Medium
Unassigned

Bug Description

If you try to add to a specific list from the My List menu on the record details page in the staff client using TPAC, you get an internal server error. Same thing appears to happen on the search results page, though I'm now getting a "redirect loop" message.

The bib does actually get added to the list, though. Something that I didn't notice on our production system, but now seems to be happening on my development VM.

This requires some more investigation, but I do believe it has to do with $ctx->{referer} being undefined in the staff client.

The fix may be as simple as not trying to redirect back to the search or details page in the staff client.

Tags: pullrequest
Changed in evergreen:
status: New → In Progress
assignee: nobody → Jason Stephenson (jstephenson)
Revision history for this message
Jason Stephenson (jstephenson) wrote :

There's a potential solution in the working repo:

working/user/dyrcona/lp1052941

Changed in evergreen:
status: In Progress → Confirmed
assignee: Jason Stephenson (jstephenson) → nobody
tags: added: pullrequest
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Guess I should add what the solution does.

When in staff client context, the add to my list menu options won't attempt to redirect back to the search page. The add to my list url is additionally opened in a new tab so that the user doesn't lose their search results with no way to get back.

Revision history for this message
Ben Shum (bshum) wrote :

Works for me. I think I like it opening in a new tab too.

Sign-off: user/bshum/lp1052941

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/bshum/lp1052941

Changed in evergreen:
milestone: none → 2.4.0-alpha
importance: Undecided → Medium
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

While testing this, I came up with a question for you guys. To be clear, because I haven't looked in this area in a while, is it normal/desirable for the user to be redirected to the lists page in general, without any list expanded, after adding a title to a specific list in the staff client?

Revision history for this message
Jason Stephenson (jstephenson) wrote :

TPAC, outside of the staff client, redirects the patron back to their search or details page, so I didn't think about opening the list or what not in the staff client. This was a quick fix for something that throws an Internal Server Error or gives a message about an impossible redirect in the staff client.

If you think the list should be open, I think that could be arranged.

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

For my purposes in testing this, I'm satisfied that I was seeing the intended/expected behavior. It does seem to me that having the list be open would be slightly better, but as I think you would agree, that can be another ticket.

Pushed to master and rel_2_3. Thanks Jason.

Changed in evergreen:
status: Confirmed → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Note that the code in this branch still saves the last four digits of the card number, which are returned to Evergreen from Stripe (but not the whole card number, of course), in the database. Same for card expiration date.

I am not an expert in PCI compliance, but if that changes the responsibilities/audit-exposure of sites, the relevant code can be changed easily. The only negative(?) side effect I know of is that we wouldn't be able to show those things in patron receipts.

Revision history for this message
Lebbeous Fogle-Weekley (lebbeous) wrote :

Sorry, I fail. Above comment was meant to go on bug 1227871, not here.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.