Bug 17153 - Logging in during a search navigates to account page instead of back to search results
Summary: Logging in during a search navigates to account page instead of back to searc...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lee Jamison
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2016-08-19 19:22 UTC by Lee Jamison
Modified: 2019-10-14 19:58 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Forces redirect to search results after logging in on opac-search.pl (1.13 KB, patch)
2016-08-19 19:36 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 17153: Fixed Fail Fail (2.39 KB, patch)
2016-08-22 19:01 UTC, Lee Jamison
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 17153: Logging in during a search should navigate back to search results (2.84 KB, patch)
2016-08-22 23:05 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 17153: Simplified redirect (2.35 KB, patch)
2016-08-23 16:04 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 17153 - Add logic to pass URL to output so redirct to search results can occur (3.02 KB, patch)
2016-11-16 14:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17153 - Add logic to pass URL to output so redirct to search results can occur (3.00 KB, patch)
2016-11-16 14:37 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 17153: Login during search rebase and fix (3.80 KB, patch)
2018-05-31 16:48 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 17153: Login during search rebase and fix (3.90 KB, patch)
2018-06-08 19:43 UTC, Maryse Simard
Details | Diff | Splinter Review
Bug 17153: Login during search rebase and fix (3.93 KB, patch)
2018-06-26 06:22 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 17153: Redirect to search when logging in from search (3.94 KB, patch)
2018-06-26 06:23 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lee Jamison 2016-08-19 19:22:51 UTC
When a patron logs in the OPAC on any page, except opac-reserve.pl, they are always redirected to opac-user.pl.

This can prove to be problematic in regards to tasks such as navigating search results (including both catalog and EDS searches if the EDS plugin is installed), adding tags, adding comments, or nearly any other action which requires a patron to login.
Comment 1 Lee Jamison 2016-08-19 19:36:54 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-08-22 16:41:51 UTC
Sorry, while applying I get:
"fatal: sha1 information is lacking or useless (opac/opac-user.pl)"
Can not fall back to 3-way-merge because of missing Blobs.
Comment 3 Lee Jamison 2016-08-22 18:56:49 UTC
Sorry about that, Marc!

I'm uploading an updated patch now which should correct that fatality.
Comment 4 Lee Jamison 2016-08-22 19:01:22 UTC Comment hidden (obsolete)
Comment 5 Aleisha Amohia 2016-08-22 23:05:48 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-08-23 15:33:39 UTC
Hi Lee, eds-search.pl is not part of Koha and this part of the patch should be removed I'd say.
Comment 7 Lee Jamison 2016-08-23 16:04:43 UTC
Created attachment 54782 [details] [review]
Bug 17153: Simplified redirect

To test:
- Perform a catalog search
- Login from opac-search.pl
- Without the patch, the page should redirect to opac-user.pl
- Log out
- Apply patch
- Perform a search again
- Login again from opac-search.pl
- The page should redirect back to search results
Comment 8 Owen Leonard 2016-08-30 15:53:09 UTC
This works for me, but the QA tools warn that the changes to Output.pm introduce tab characters. Indentation should be 4 spaces:

https://wiki.koha-community.org/wiki/Coding_Guidelines#PERL6:_Indentation

When you modify your patch, please use the bug report title as the commit message's first line:

"Bug 17153 - Logging in during a search navigates to account page instead of back to search results"

...and include test plan in your commit message as well.

Thanks!
Comment 9 Lee Jamison 2016-08-31 15:21:13 UTC
Owen,

Thank you for the constructive criticism! This was my very first attempt at a bug report so I'm still learning. I made a note to myself to make your suggestions a habit from now on! I'll make necessary changes then re-submit.

For my own knowledge, when I upload the update, should I put the status to Needs Signoff? Or Signed Off? Thanks!
Comment 10 Owen Leonard 2016-08-31 15:52:54 UTC
(In reply to Lee Jamison from comment #9)
> For my own knowledge, when I upload the update, should I put the status to
> Needs Signoff? Or Signed Off? Thanks!

Set the status back to "needs signoff" so that everyone knows it is ready for testing again.
Comment 11 Kyle M Hall 2016-11-16 14:37:07 UTC
Created attachment 57549 [details] [review]
Bug 17153 - Add logic to pass URL to output so redirct to search results can occur
Comment 12 Kyle M Hall 2016-11-16 14:37:59 UTC
Created attachment 57550 [details] [review]
Bug 17153 - Add logic to pass URL to output so redirct to search results can occur
Comment 13 Viktor Sarge 2016-12-28 11:29:16 UTC
I would love to see this bug fixed. It's quite annoying to lose your context and having to search again for the book you were about to tag/comment etc. When no longer being taken to opac-user.pl when logging in it will be less obvious for end users how to get to their account. Hence the tagging of 2093 as a "see also".
Comment 14 Jonathan Druart 2016-12-29 09:08:35 UTC
Kyle, is this patch ready for signoff?
Comment 15 Katrin Fischer 2017-10-08 11:08:46 UTC
There is a small conflict, can you please rebase?

Applying: Bug 17153 - Add logic to pass URL to output so redirct to search results can occur
Using index info to reconstruct a base tree...
M	C4/Output.pm
M	opac/opac-search.pl
M	opac/opac-user.pl
Falling back to patching base and 3-way merge...
Auto-merging opac/opac-user.pl
CONFLICT (content): Merge conflict in opac/opac-user.pl
Auto-merging opac/opac-search.pl
Auto-merging C4/Output.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 17153 - Add logic to pass URL to output so redirct to search results can occur
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-17153---Add-logic-to-pass-URL-to-output-so-red-YH0gjy.patch
Comment 16 Lee Jamison 2018-05-31 16:48:02 UTC
Created attachment 75714 [details] [review]
Bug 17153: Login during search rebase and fix

This patch is a fresh attempt at redirecting back to search
results after logging in on opac-search.pl

To test:
- Perform an OPAC search
- Login on opac-search.pl with the search results displayed
- The page is redirected to opac-user.pl
- Log out
- Apply the patch
- Perform a new OPAC search
- Note the URL query string
- Login on opac-search.pl with the search results displayed
- The opac-search.pl page should be displayed with the correct
  query string and the page should indicate a logged in status
Comment 17 Katrin Fischer 2018-06-03 08:02:19 UTC
Hi Maryse, did you mean to sign off on this patch? I see that you changed the status. Did you test and can you add your sign-off line to the patch plz?
Comment 18 Maryse Simard 2018-06-08 19:43:16 UTC
Created attachment 75933 [details] [review]
Bug 17153: Login during search rebase and fix

This patch is a fresh attempt at redirecting back to search
results after logging in on opac-search.pl

To test:
- Perform an OPAC search
- Login on opac-search.pl with the search results displayed
- The page is redirected to opac-user.pl
- Log out
- Apply the patch
- Perform a new OPAC search
- Note the URL query string
- Login on opac-search.pl with the search results displayed
- The opac-search.pl page should be displayed with the correct
  query string and the page should indicate a logged in status

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.
Comment 19 Katrin Fischer 2018-06-26 06:22:18 UTC
Created attachment 76429 [details] [review]
Bug 17153: Login during search rebase and fix

This patch is a fresh attempt at redirecting back to search
results after logging in on opac-search.pl

To test:
- Perform an OPAC search
- Login on opac-search.pl with the search results displayed
- The page is redirected to opac-user.pl
- Log out
- Apply the patch
- Perform a new OPAC search
- Note the URL query string
- Login on opac-search.pl with the search results displayed
- The opac-search.pl page should be displayed with the correct
  query string and the page should indicate a logged in status

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 Katrin Fischer 2018-06-26 06:23:05 UTC
Created attachment 76430 [details] [review]
Bug 17153: Redirect to search when logging in from search

This patch is a fresh attempt at redirecting back to search
results after logging in on opac-search.pl

To test:
- Perform an OPAC search
- Login on opac-search.pl with the search results displayed
- The page is redirected to opac-user.pl
- Log out
- Apply the patch
- Perform a new OPAC search
- Note the URL query string
- Login on opac-search.pl with the search results displayed
- The opac-search.pl page should be displayed with the correct
  query string and the page should indicate a logged in status

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Followed the test plan and the patch works.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 21 Katrin Fischer 2018-06-26 06:25:20 UTC
Please always describe your change in your subject line :)
Comment 22 Nick Clemens (kidclamp) 2018-06-29 21:04:47 UTC
Awesome work all!

Pushed to master for 18.11
Comment 23 Martin Renvoize 2018-07-02 09:22:59 UTC
Enhancement, changes behaviour, not backporting for 18.05.x series.