Bug 5524

Summary: Can't delete list from second page of results
Product: Koha Reporter: Owen Leonard <oleonard>
Component: ListsAssignee: Chris Cormack <chris>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris, koha.sekjal, nengard, smoreland
Version: Main   
Hardware: All   
OS: All   
URL: /cgi-bin/koha/opac-shelves.pl?display=privateshelves&shelfoff=2
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6279
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 6792    
Attachments: Bug 5524 : Cant delete list from the second page of lists
Bug 5524 : Cant delete list from the second page of lists
Bug 5524 - Follow up fixing deleting lists in OPAC
Signed-off patches, squashed

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.