Bug 36274 - OPAC suggestions form doesn't display
Summary: OPAC suggestions form doesn't display
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Lucas Gass (lukeg)
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 34478
Blocks: 36044
  Show dependency treegraph
 
Reported: 2024-03-07 13:25 UTC by Katrin Fischer
Modified: 2024-03-20 12:08 UTC (History)
3 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:
24.05.00
Circulation function:


Attachments
Bug 36274: Use right op on opac-suggestions.tt (2.83 KB, patch)
2024-03-07 15:30 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 36274: Correct links leading to purchase suggestion page (4.83 KB, patch)
2024-03-07 23:16 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 36274: Correct links leading to purchase suggestion page (4.88 KB, patch)
2024-03-08 22:07 UTC, David Nind
Details | Diff | Splinter Review
Bug 36274: Correct links leading to purchase suggestion page (4.97 KB, patch)
2024-03-15 08:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2024-03-07 13:25:17 UTC
When in the OPAC and I click on "New suggestion", only an empty page comes up. The form is missing. 
I didn't see anything in the logs.
Not sure if this is related to CSRF or not?
Comment 1 Lucas Gass (lukeg) 2024-03-07 15:30:31 UTC
Created attachment 162907 [details] [review]
Bug 36274: Use right op on opac-suggestions.tt

To test:
1. click on "New suggestion", only an empty page comes up. The form is missing.
2. Apply patch and try again.
3. Play with suggestions making sure everything looks as excepted.
Comment 2 Lucas Gass (lukeg) 2024-03-07 15:31:11 UTC
(In reply to Katrin Fischer from comment #0)
> When in the OPAC and I click on "New suggestion", only an empty page comes
> up. The form is missing. 
> I didn't see anything in the logs.
> Not sure if this is related to CSRF or not?

Yes, related to CSRF but a trivial fix.
Comment 3 Owen Leonard 2024-03-07 18:04:03 UTC
This works to display the form I think there's still a problem with the check for duplicates. I filled out the form (title, author, isbn, and year) using information from a book already in the catalog and when I submitted it I got a blank page.
Comment 4 Lucas Gass (lukeg) 2024-03-07 23:16:32 UTC
Created attachment 162935 [details] [review]
Bug 36274: Correct links leading to purchase suggestion page

To test:
1. APPLY PATCH
2. As a logged in OPAC user go to 'Your account' > Purchase suggestion. The form should display.
3. Make a suggestion and confirm it works.
4. Try to make a suggestion using title, author, isbn information from an item that already exists.
5. See the "A similar document already exists:" warning. Confirm the suggestion anyways.
6. Set MaxTotalSuggestions to 4 and NumberOfSuggestionDays to 2. Make sure you can still navigate to the purchase suggestion form.
7. Do an OPAC search that will yield no results as a logged in user.
8. Click the "Make a purchase suggestion" link, making sure it works.
9. Turn on AnonSuggestions and log out of the OPAC.
10. Do an OPAC search that will yield no results. Again click the "Make a purchase suggestion", confirm it works.
Comment 5 Lucas Gass (lukeg) 2024-03-07 23:17:21 UTC
(In reply to Owen Leonard from comment #3)
> This works to display the form I think there's still a problem with the
> check for duplicates. I filled out the form (title, author, isbn, and year)
> using information from a book already in the catalog and when I submitted it
> I got a blank page.

Good catch. I approached this the wrong way. My new patch should be better.
Comment 6 David Nind 2024-03-08 22:07:38 UTC
Created attachment 162994 [details] [review]
Bug 36274: Correct links leading to purchase suggestion page

To test:
1. APPLY PATCH
2. As a logged in OPAC user go to 'Your account' > Purchase suggestion. The form should display.
3. Make a suggestion and confirm it works.
4. Try to make a suggestion using title, author, isbn information from an item that already exists.
5. See the "A similar document already exists:" warning. Confirm the suggestion anyways.
6. Set MaxTotalSuggestions to 4 and NumberOfSuggestionDays to 2. Make sure you can still navigate to the purchase suggestion form.
7. Do an OPAC search that will yield no results as a logged in user.
8. Click the "Make a purchase suggestion" link, making sure it works.
9. Turn on AnonSuggestions and log out of the OPAC.
10. Do an OPAC search that will yield no results. Again click the "Make a purchase suggestion", confirm it works.

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Marcel de Rooy 2024-03-15 08:02:52 UTC
Created attachment 163166 [details] [review]
Bug 36274: Correct links leading to purchase suggestion page

To test:
1. APPLY PATCH
2. As a logged in OPAC user go to 'Your account' > Purchase suggestion. The form should display.
3. Make a suggestion and confirm it works.
4. Try to make a suggestion using title, author, isbn information from an item that already exists.
5. See the "A similar document already exists:" warning. Confirm the suggestion anyways.
6. Set MaxTotalSuggestions to 4 and NumberOfSuggestionDays to 2. Make sure you can still navigate to the purchase suggestion form.
7. Do an OPAC search that will yield no results as a logged in user.
8. Click the "Make a purchase suggestion" link, making sure it works.
9. Turn on AnonSuggestions and log out of the OPAC.
10. Do an OPAC search that will yield no results. Again click the "Make a purchase suggestion", confirm it works.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Katrin Fischer 2024-03-15 08:40:20 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-03-18 09:08:27 UTC
So depends on Bug 34478 right ?
Comment 10 Katrin Fischer 2024-03-18 09:09:31 UTC
(In reply to Fridolin Somers from comment #9)
> So depends on Bug 34478 right ?

Correct
Comment 11 Fridolin Somers 2024-03-18 15:49:22 UTC
Bug 34478 not in 23.11.x