Bug 27734 - OpacHiddenItems produces a 404 from borrower holds list
Summary: OpacHiddenItems produces a 404 from borrower holds list
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lari Taskula
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
: 22286 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-02-19 15:59 UTC by Martha Fuerst
Modified: 2025-01-23 14:22 UTC (History)
7 users (show)

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


Attachments
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences (6.55 KB, patch)
2021-06-09 19:33 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences (6.55 KB, patch)
2021-06-10 16:14 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences (7.70 KB, patch)
2021-06-15 12:03 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences (6.60 KB, patch)
2021-06-15 12:13 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences (7.71 KB, patch)
2021-06-15 12:28 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences (7.72 KB, patch)
2024-10-22 14:44 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences (9.28 KB, patch)
2024-10-22 14:45 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 27734: Replace OpacHiddenRecordMessage system preference with HTML customization (9.28 KB, patch)
2024-10-22 14:47 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences (7.78 KB, patch)
2024-12-19 22:24 UTC, Roman Dolny
Details | Diff | Splinter Review
Bug 27734: Replace OpacHiddenRecordMessage system preference with HTML customization (9.33 KB, patch)
2024-12-19 22:24 UTC, Roman Dolny
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martha Fuerst 2021-02-19 15:59:28 UTC
When a borrower clicks on a hold in their holds list they have placed on a title that was subsequently hidden with OpacHiddenItems, it results in a 404 error instead of the "This record is blocked" error page.

It seems like OpacHiddenItems should work the same as individually suppressed records and how they are handled in OpacSuppressionRedirect. This would make more sense from the user's perspective.
Comment 1 Nick Clemens (kidclamp) 2021-06-09 19:33:37 UTC
Created attachment 121749 [details] [review]
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences

This patch adds options analogous to OpacSuppressionRedirect and OpacSuppressionMessage for OpacHiddtenItems

Test plan:
1 - Apply patch
2 - Test OpacSupressionsRedirect and OpacSuppressionMessage prefs to ensure they work as before
3 - Enable OpacHiddenItemsHidesRecord and hide a biblio using OpacHiddenItems:
    biblionumber: [303]
3 - Test OpacHiddenRecordRedirect and OpacHiddenRecordMessage to ensure they work as expected
4 - Hit the link: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=303
5 - When OpacHiddenRecordRedirect set to 404 you get a 404
6 - When OpacHiddenRecordRedirect set to 'an explanatory page' you get 'opac-blocked.pl'
7 - If you set a message in  OpacHiddenRecordMessage  it displays on opac-blocked.pl
Comment 2 PTFS Europe Sandboxes 2021-06-10 16:14:30 UTC
Created attachment 121797 [details] [review]
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences

This patch adds options analogous to OpacSuppressionRedirect and OpacSuppressionMessage for OpacHiddtenItems

Test plan:
1 - Apply patch
2 - Test OpacSupressionsRedirect and OpacSuppressionMessage prefs to ensure they work as before
3 - Enable OpacHiddenItemsHidesRecord and hide a biblio using OpacHiddenItems:
    biblionumber: [303]
3 - Test OpacHiddenRecordRedirect and OpacHiddenRecordMessage to ensure they work as expected
4 - Hit the link: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=303
5 - When OpacHiddenRecordRedirect set to 404 you get a 404
6 - When OpacHiddenRecordRedirect set to 'an explanatory page' you get 'opac-blocked.pl'
7 - If you set a message in  OpacHiddenRecordMessage  it displays on opac-blocked.pl

Signed-off-by: marti <mfuerst@hmcpl.org>
Comment 3 Nick Clemens (kidclamp) 2021-06-15 12:03:20 UTC
Created attachment 121988 [details] [review]
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences

This patch adds options analogous to OpacSuppressionRedirect and OpacSuppressionMessage for OpacHiddtenItems

Test plan:
1 - Apply patch
2 - Test OpacSupressionsRedirect and OpacSuppressionMessage prefs to ensure they work as before
3 - Enable OpacHiddenItemsHidesRecord and hide a biblio using OpacHiddenItems:
    biblionumber: [303]
3 - Test OpacHiddenRecordRedirect and OpacHiddenRecordMessage to ensure they work as expected
4 - Hit the link: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=303
5 - When OpacHiddenRecordRedirect set to 404 you get a 404
6 - When OpacHiddenRecordRedirect set to 'an explanatory page' you get 'opac-blocked.pl'
7 - If you set a message in  OpacHiddenRecordMessage  it displays on opac-blocked.pl

Signed-off-by: marti <mfuerst@hmcpl.org>
Comment 4 Tomás Cohen Arazi (tcohen) 2021-06-15 12:13:12 UTC
Created attachment 121989 [details] [review]
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences

This patch adds options analogous to OpacSuppressionRedirect and OpacSuppressionMessage for OpacHiddtenItems

Test plan:
1 - Apply patch
2 - Test OpacSupressionsRedirect and OpacSuppressionMessage prefs to ensure they work as before
3 - Enable OpacHiddenItemsHidesRecord and hide a biblio using OpacHiddenItems:
    biblionumber: [303]
3 - Test OpacHiddenRecordRedirect and OpacHiddenRecordMessage to ensure they work as expected
4 - Hit the link: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=303
5 - When OpacHiddenRecordRedirect set to 404 you get a 404
6 - When OpacHiddenRecordRedirect set to 'an explanatory page' you get 'opac-blocked.pl'
7 - If you set a message in  OpacHiddenRecordMessage  it displays on opac-blocked.pl

Signed-off-by: marti <mfuerst@hmcpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Tomás Cohen Arazi (tcohen) 2021-06-15 12:28:02 UTC
Created attachment 121990 [details] [review]
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences

This patch adds options analogous to OpacSuppressionRedirect and OpacSuppressionMessage for OpacHiddtenItems

Test plan:
1 - Apply patch
2 - Test OpacSupressionsRedirect and OpacSuppressionMessage prefs to ensure they work as before
3 - Enable OpacHiddenItemsHidesRecord and hide a biblio using OpacHiddenItems:
    biblionumber: [303]
3 - Test OpacHiddenRecordRedirect and OpacHiddenRecordMessage to ensure they work as expected
4 - Hit the link: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=303
5 - When OpacHiddenRecordRedirect set to 404 you get a 404
6 - When OpacHiddenRecordRedirect set to 'an explanatory page' you get 'opac-blocked.pl'
7 - If you set a message in  OpacHiddenRecordMessage  it displays on opac-blocked.pl

Signed-off-by: marti <mfuerst@hmcpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Jonathan Druart 2021-06-21 10:41:32 UTC
Should not we stop using syspref for the messages we display on the interface? Should we use "news" instead?

See bug 26050.
Comment 7 Katrin Fischer 2021-06-21 21:05:59 UTC
(In reply to Jonathan Druart from comment #6)
> Should not we stop using syspref for the messages we display on the
> interface? Should we use "news" instead?
> 
> See bug 26050.

Actually, I think you are right. It would also be fair, since we had a similar thing just rewritten and this is a quite new patch set.
Comment 8 Magnus Enger 2021-06-29 11:18:13 UTC

*** This bug has been marked as a duplicate of bug 22286 ***
Comment 9 Magnus Enger 2021-06-29 11:21:05 UTC
Sorry, I got the duplicity backwards!
Comment 10 Magnus Enger 2021-06-29 11:21:40 UTC
*** Bug 22286 has been marked as a duplicate of this bug. ***
Comment 11 Pablo AB 2022-09-16 18:13:42 UTC
This seems to be strongly related to bug 9966. The staff should be able to let access to bibliographic info even if all items are hidden (similar as with biblios without items). Else, show an appropriate message instead of 404.
Comment 12 Lari Taskula 2024-10-22 14:44:58 UTC
Created attachment 173166 [details] [review]
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences

This patch adds options analogous to OpacSuppressionRedirect and OpacSuppressionMessage for OpacHiddtenItems

Test plan:
1 - Apply patch
2 - Test OpacSupressionsRedirect and OpacSuppressionMessage prefs to ensure they work as before
3 - Enable OpacHiddenItemsHidesRecord and hide a biblio using OpacHiddenItems:
    biblionumber: [303]
3 - Test OpacHiddenRecordRedirect and OpacHiddenRecordMessage to ensure they work as expected
4 - Hit the link: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=303
5 - When OpacHiddenRecordRedirect set to 404 you get a 404
6 - When OpacHiddenRecordRedirect set to 'an explanatory page' you get 'opac-blocked.pl'
7 - If you set a message in  OpacHiddenRecordMessage  it displays on opac-blocked.pl

Signed-off-by: marti <mfuerst@hmcpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Lari Taskula 2024-10-22 14:45:00 UTC Comment hidden (obsolete)
Comment 14 Lari Taskula 2024-10-22 14:46:54 UTC
I've rebased the original patch and added a new patch that replaces OpacHiddenRecordMessage system preference with an HTML customization entry of the same name.
Comment 15 Lari Taskula 2024-10-22 14:47:44 UTC
Created attachment 173168 [details] [review]
Bug 27734: Replace OpacHiddenRecordMessage system preference with HTML customization

This patch replaces OpacHiddenRecordMessage preference with an HTML customization
of the same name.

Test plan:
1 - Apply patch
2 - Test OpacSupressionsRedirect and OpacSuppressionMessage prefs to ensure they work as before
3 - Set preference OpacHiddenRecordRedirect on and create HTML customization OpacHiddenRecordMessage
4 - Enable OpacHiddenItemsHidesRecord and hide a biblio using OpacHiddenItems:
    biblionumber: [303]
5 - Test OpacHiddenRecordRedirect and OpacHiddenRecordMessage to ensure they work as expected
6 - Hit the link: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=303
7 - When OpacHiddenRecordRedirect set to 404 you get a 404
8 - When OpacHiddenRecordRedirect set to 'an explanatory page' you get 'opac-blocked.pl'
9 - If you set a message in  OpacHiddenRecordMessage  it displays on opac-blocked.pl
Comment 16 Roman Dolny 2024-12-19 22:24:44 UTC
Created attachment 175807 [details] [review]
Bug 27734: Add OpacHiddenRecordRedirect and OpacHiddenRecordMessage system preferences

This patch adds options analogous to OpacSuppressionRedirect and OpacSuppressionMessage for OpacHiddtenItems

Test plan:
1 - Apply patch
2 - Test OpacSupressionsRedirect and OpacSuppressionMessage prefs to ensure they work as before
3 - Enable OpacHiddenItemsHidesRecord and hide a biblio using OpacHiddenItems:
    biblionumber: [303]
3 - Test OpacHiddenRecordRedirect and OpacHiddenRecordMessage to ensure they work as expected
4 - Hit the link: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=303
5 - When OpacHiddenRecordRedirect set to 404 you get a 404
6 - When OpacHiddenRecordRedirect set to 'an explanatory page' you get 'opac-blocked.pl'
7 - If you set a message in  OpacHiddenRecordMessage  it displays on opac-blocked.pl

Signed-off-by: marti <mfuerst@hmcpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 17 Roman Dolny 2024-12-19 22:24:47 UTC
Created attachment 175808 [details] [review]
Bug 27734: Replace OpacHiddenRecordMessage system preference with HTML customization

This patch replaces OpacHiddenRecordMessage preference with an HTML customization
of the same name.

Test plan:
1 - Apply patch
2 - Test OpacSupressionsRedirect and OpacSuppressionMessage prefs to ensure they work as before
3 - Set preference OpacHiddenRecordRedirect on and create HTML customization OpacHiddenRecordMessage
4 - Enable OpacHiddenItemsHidesRecord and hide a biblio using OpacHiddenItems:
    biblionumber: [303]
5 - Test OpacHiddenRecordRedirect and OpacHiddenRecordMessage to ensure they work as expected
6 - Hit the link: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=303
7 - When OpacHiddenRecordRedirect set to 404 you get a 404
8 - When OpacHiddenRecordRedirect set to 'an explanatory page' you get 'opac-blocked.pl'
9 - If you set a message in  OpacHiddenRecordMessage  it displays on opac-blocked.pl

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Comment 18 Katrin Fischer 2024-12-30 13:09:23 UTC
Tomas, you are still QA contact here, could you take another look?
Comment 19 Jonathan Druart 2025-01-23 14:22:21 UTC
Feels like opac-MARCdetail and opac-ISBDdetail will need adjustement.

We should follow what has been done on bug 38936.