If AnonSuggestions is disabled and a non-logged-in user tries to suggest purchase of an existing title the suggestion form isn't correctly populated with the title information. To reproduce: - View a title in the OPAC as a non-logged-in user - Click the link to suggest purchase of an additional copy - Log in - Instead of a pre-populated suggestion form you'll see either your list of existing suggestions (if any) or nothing.
Created attachment 96829 [details] [review] Bug 24345: Fix process of suggesting purchase of existing title for non-logged-in users The 'op' parameter is removed from the CGI object ($input) before get_template_and_user is called. When the user is redirected to the login form (from checkauth, called from get_template_and_user), the op is lost. Moving down the deletion fixes the problem. Test plan: Logout at the OPAC Go the detail page of a bibliographic record Click the "Suggest for purchase" link Fill the login form => Without this patch you will see your suggestion list => With this patch applied the new suggestion form will be displayed, prefilled with the biblio's info
Created attachment 96830 [details] [review] Bug 24345: Fix process of suggesting purchase of existing title for non-logged-in users The 'op' parameter is removed from the CGI object ($input) before get_template_and_user is called. When the user is redirected to the login form (from checkauth, called from get_template_and_user), the op is lost. Moving down the deletion fixes the problem. Test plan: Logout at the OPAC Go the detail page of a bibliographic record Click the "Suggest for purchase" link Fill the login form => Without this patch you will see your suggestion list => With this patch applied the new suggestion form will be displayed, prefilled with the biblio's info Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This change has side effects. It seems to break viewing other purchase suggestions anonymously (enable OPACViewOthersSuggestions). Might be possible that we only should add the op=else parameter in the masthead link, but it needs more checking. The script is a bit messy in the handling of $op..
Created attachment 97651 [details] [review] Bug 24345: Fix OPACViewOthersSuggestions Default value for $op needs to be set before the get_template_and_user lines as it's tested for OPACViewOthersSuggestions.
(In reply to Marcel de Rooy from comment #3) > This change has side effects. > It seems to break viewing other purchase suggestions anonymously (enable > OPACViewOthersSuggestions). Might be possible that we only should add the > op=else parameter in the masthead link, but it needs more checking. > > The script is a bit messy in the handling of $op.. Ha! Thanks Marcel!
Created attachment 97717 [details] [review] Bug 24345: Fix process of suggesting purchase of existing title for non-logged-in users The 'op' parameter is removed from the CGI object ($input) before get_template_and_user is called. When the user is redirected to the login form (from checkauth, called from get_template_and_user), the op is lost. Moving down the deletion fixes the problem. Test plan: Logout at the OPAC Go the detail page of a bibliographic record Click the "Suggest for purchase" link Fill the login form => Without this patch you will see your suggestion list => With this patch applied the new suggestion form will be displayed, prefilled with the biblio's info Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Created attachment 97718 [details] [review] Bug 24345: Fix OPACViewOthersSuggestions Default value for $op needs to be set before the get_template_and_user lines as it's tested for OPACViewOthersSuggestions. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work everyone! Pushed to master for 20.05
Missing dependency, not backported to 19.11