software error message - authorities
I tried to delete an authority record with 0 biblios and got the following message: Undefined subroutine &C4::AuthoritiesMarc::prepare called at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 720. We're running 3.2.5. I can't seem to delete any authorities at the moment. Any idea what this means, or how we can fix it? -- Elaine Bradtke Data Wrangler VWML English Folk Dance and Song Society | http://www.efdss.org Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY Tel +44 (0) 20 7485 2206 ext 36 -------------------------------------------------------------------------- Registered Company No. 297142 Charity Registered in England and Wales No. 305999 --------------------------------------------------------------------------- "Writing about music is like dancing about architecture" --Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)
On Tue, Mar 8, 2011 at 9:26 PM, Elaine Bradtke <eb@efdss.org> wrote:
I tried to delete an authority record with 0 biblios and got the following message: Undefined subroutine &C4::AuthoritiesMarc::prepare called at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 720.
We're running 3.2.5. I can't seem to delete any authorities at the moment. Any idea what this means, or how we can fix it?
I'm not able to answer your actual questions, but as a workaround, if you are *sure* there are no references to the authority record, just delete it via MySQL, phpMySQLadmin, etc.
The thing is it used to work. . . something happened in the recent version, but as I don't delete authority records that often, I am not sure exactly when it stopped working. On Wed, Mar 9, 2011 at 2:34 AM, <hansbkk@gmail.com> wrote:
On Tue, Mar 8, 2011 at 9:26 PM, Elaine Bradtke <eb@efdss.org> wrote:
I tried to delete an authority record with 0 biblios and got the following message: Undefined subroutine &C4::AuthoritiesMarc::prepare called at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 720.
We're running 3.2.5. I can't seem to delete any authorities at the moment. Any idea what this means, or how we can fix it?
I'm not able to answer your actual questions, but as a workaround, if you are *sure* there are no references to the authority record, just delete it via MySQL, phpMySQLadmin, etc.
-- Elaine Bradtke Data Wrangler VWML English Folk Dance and Song Society | http://www.efdss.org Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY Tel +44 (0) 20 7485 2206 ext 36 -------------------------------------------------------------------------- Registered Company No. 297142 Charity Registered in England and Wales No. 305999 --------------------------------------------------------------------------- "Writing about music is like dancing about architecture" --Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)
On 08/03/11 14:26, Elaine Bradtke wrote:
I tried to delete an authority record with 0 biblios and got the following message: Undefined subroutine &C4::AuthoritiesMarc::prepare called at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 720.
We're running 3.2.5. I can't seem to delete any authorities at the moment. Any idea what this means, or how we can fix it?
If you look at this line you'll see DelAuthority is calling a non-existent prepare subroutine it should be calling dbh's prepare method. There's a recent patch that fixes this bug:
commit 18faba5e06d2696bd4e99175b1c2208a8512f9d9 Author: Marcel de Rooy <M.de.Rooy@rijksmuseum.nl> Date: Mon Feb 28 08:30:07 2011 +0000
Bug 1953 - Follow up fix on security patch
Fixing: Undefined subroutine prepare called on line 722.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> (cherry picked from commit 439d2224e1215fa876ff7c5a06f773003555a035)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 2e10762..6cbe373 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -717,7 +717,7 @@ sub DelAuthority { my $dbh=C4::Context->dbh;
ModZebra($authid,"recordDelete","authorityserver",GetAuthority($authid),undef); - my $sth = prepare("DELETE FROM auth_header WHERE authid=?"); + my $sth = $dbh->prepare("DELETE FROM auth_header WHERE authid=?"); $sth->execute($authid); }
-- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 845 557 5634 (phone) +44 (0) 7759 633626 (mobile) colin.campbell@ptfs-europe.com skype: colin_campbell2 http://www.ptfs-europe.com
Thanks I filed a bug and was nearly immediately told it duplicates bug 1953 (I did search, but obviously not with the correct terms!) On Thu, Mar 10, 2011 at 3:02 PM, Colin Campbell <colin.campbell@ptfs-europe.com> wrote:
On 08/03/11 14:26, Elaine Bradtke wrote:
I tried to delete an authority record with 0 biblios and got the following message: Undefined subroutine &C4::AuthoritiesMarc::prepare called at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 720.
We're running 3.2.5. I can't seem to delete any authorities at the moment. Any idea what this means, or how we can fix it?
If you look at this line you'll see DelAuthority is calling a non-existent prepare subroutine it should be calling dbh's prepare method.
There's a recent patch that fixes this bug:
commit 18faba5e06d2696bd4e99175b1c2208a8512f9d9 Author: Marcel de Rooy <M.de.Rooy@rijksmuseum.nl> Date: Mon Feb 28 08:30:07 2011 +0000
Bug 1953 - Follow up fix on security patch
Fixing: Undefined subroutine prepare called on line 722.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> (cherry picked from commit 439d2224e1215fa876ff7c5a06f773003555a035)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 2e10762..6cbe373 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -717,7 +717,7 @@ sub DelAuthority { my $dbh=C4::Context->dbh;
ModZebra($authid,"recordDelete","authorityserver",GetAuthority($authid),undef); - my $sth = prepare("DELETE FROM auth_header WHERE authid=?"); + my $sth = $dbh->prepare("DELETE FROM auth_header WHERE authid=?"); $sth->execute($authid); }
-- Colin Campbell Chief Software Engineer, PTFS Europe Limited Content Management and Library Solutions +44 (0) 845 557 5634 (phone) +44 (0) 7759 633626 (mobile) colin.campbell@ptfs-europe.com skype: colin_campbell2
http://www.ptfs-europe.com _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
-- Elaine Bradtke Data Wrangler VWML English Folk Dance and Song Society | http://www.efdss.org Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY Tel +44 (0) 20 7485 2206 ext 36 -------------------------------------------------------------------------- Registered Company No. 297142 Charity Registered in England and Wales No. 305999 --------------------------------------------------------------------------- "Writing about music is like dancing about architecture" --Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)
participants (3)
-
Colin Campbell -
Elaine Bradtke -
hansbkk@gmail.com