Bug 5524 - Can't delete list from second page of results
Summary: Can't delete list from second page of results
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Lists (show other bugs)
Version: master
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Chris Cormack
QA Contact: Bugs List
URL: /cgi-bin/koha/opac-shelves.pl?display...
Keywords:
Depends on:
Blocks: 6792
  Show dependency treegraph
 
Reported: 2010-12-20 14:34 UTC by Owen Leonard
Modified: 2013-12-05 20:05 UTC (History)
4 users (show)

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


Attachments
Bug 5524 : Cant delete list from the second page of lists (4.00 KB, patch)
2011-08-26 02:11 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 5524 : Cant delete list from the second page of lists (4.00 KB, patch)
2011-08-28 20:48 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 5524 - Follow up fixing deleting lists in OPAC (1.75 KB, patch)
2011-08-28 20:52 UTC, Chris Cormack
Details | Diff | Splinter Review
Signed-off patches, squashed (5.62 KB, patch)
2011-08-29 14:45 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2010-12-20 14:34:43 UTC
If you have more than one page of lists and try to delete a list from the second page you'll get an error: ERROR: List number XX unrecognized (where XX is the shelfnumber of your list). 

Strangely, even if you click the list to view its contents (/opac-shelves.pl?display=privateshelves&viewshelf=XX&sortfield=title), clicking 'Delete' will give you the same message.
Comment 1 Nicole C. Engard 2011-04-28 12:10:16 UTC
*** Bug 6279 has been marked as a duplicate of this bug. ***
Comment 2 Chris Cormack 2011-08-26 01:10:02 UTC
Working on this now
Comment 3 Chris Cormack 2011-08-26 01:35:47 UTC
I see the problem, the list only fetches 20, and we aren't passing the offset in, so it fetches 20, and the 1 you want to delete isnt part of that 20.

Working on a fix now
Comment 4 Chris Cormack 2011-08-26 02:11:33 UTC Comment hidden (obsolete)
Comment 5 Owen Leonard 2011-08-26 16:54:08 UTC
This patch seems to work, but has one minor bug. The two instances of this:

<input type="hidden" name="shelfoff" value="[% shelfoff %]">

...should be:


<input type="hidden" name="shelfoff" value="[% shelfoff %]" />

Could a follow-up patch include the same fix for the OPAC as well?
Comment 6 Chris Cormack 2011-08-28 20:48:28 UTC Comment hidden (obsolete)
Comment 7 Chris Cormack 2011-08-28 20:49:02 UTC
Fixed patch for staff side, follow up patch for opac on its way
Comment 8 Chris Cormack 2011-08-28 20:52:16 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2011-08-29 14:45:06 UTC
Created attachment 5212 [details] [review]
Signed-off patches, squashed
Comment 10 Ian Walls 2011-08-29 14:54:56 UTC
Simple change, mostly template, with the addition of a variable to the Perl.  Easy to read, marking as Passed QA
Comment 11 Chris Cormack 2011-09-01 08:58:58 UTC
Pushed please test
Comment 12 Chris Nighswonger 2011-10-26 18:02:26 UTC
The fix for this bug was published in the 3.4.5 release. If you were the reporter of this bug, please take time to verify the fix and update the status of this bug report accordingly. If the bug is fixed to your satisfaction, please close this report.