How to delete a record after entering a rare unicode character

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to delete a record after entering a rare unicode character

Marc Nürnberger-2
Dear List,

On koha 3.0.3 we edited a title of a record, inserting the following
unicode charachter 𡼱 [it's a rare Chinese character][Decimal: 139057;
UTF-8: F0 A1 BC B1] from unicode.org. In the input field it looked
just fine. But after saving the record, we got a fatal error message
and the record became inaccesible. Under the old title it is still
searchable (intranet and OPAC), but if you follow the respective
links, you get invariably the following error messages:

########

Intranet: Error 404

########

OPAC: The following fatal error has occurred:

Can't call method "clone" on an undefined value at
/usr/share/koha/lib/C4/XSLT.pm line 56.

#########

Has anyone experienced similar things? Are there any restrictions on
the unicode rage for input that we should be aware of?

And last but not least, how can I delete or access the compromised
record again?

Any help would be warmly appreciated.

Best regards,
Marc


_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: How to delete a record after entering a rare unicode character

Frédéric Demians

> On koha 3.0.3 we edited a title of a record, inserting the following
> unicode charachter 𡼱 [it's a rare Chinese character][Decimal: 139057;
> UTF-8: F0 A1 BC B1] from unicode.org. In the input field it looked
> just fine. But after saving the record, we got a fatal error message
> and the record became inaccesible. Under the old title it is still
> searchable (intranet and OPAC), but if you follow the respective
> links, you get invariably the following error messages:

I can confirm this bug. This character break marcxml biblioitems table
field: field content stops a this character and so XML marc document
can't be parsed anymore.

> And last but not least, how can I delete or access the compromised
> record again?

It's not possible to recreate by hand such a corrupted xml marc record.
You have to delete the record identified by its biblionumber in your
MySQL DB:

    DELETE FROM biblio WHERE biblionumber=x
    DELETE FROM biblioitems WHERE biblionumber=x
    DELETE FROM items WHERE biblionumber=x

And then rebuild zebra indexes : rebuild_zebra -r -b

--
Frédéric




_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: How to delete a record after entering a rare unicode character

Marc Nürnberger-2
Dear Frédéric,

Thank you very much for the quick fix. It worked just fine!

Is there a way to predict, which unicode character will break the code?

Best,
Marc

Frederic Demians schrieb:

>
>> On koha 3.0.3 we edited a title of a record, inserting the following
>> unicode charachter 𡼱 [it's a rare Chinese character][Decimal: 139057;
>> UTF-8: F0 A1 BC B1] from unicode.org. In the input field it looked
>> just fine. But after saving the record, we got a fatal error message
>> and the record became inaccesible. Under the old title it is still
>> searchable (intranet and OPAC), but if you follow the respective
>> links, you get invariably the following error messages:
>
> I can confirm this bug. This character break marcxml biblioitems table
> field: field content stops a this character and so XML marc document
> can't be parsed anymore.
>
>> And last but not least, how can I delete or access the compromised
>> record again?
>
> It's not possible to recreate by hand such a corrupted xml marc record.
> You have to delete the record identified by its biblionumber in your
> MySQL DB:
>
>    DELETE FROM biblio WHERE biblionumber=x
>    DELETE FROM biblioitems WHERE biblionumber=x
>    DELETE FROM items WHERE biblionumber=x
>
> And then rebuild zebra indexes : rebuild_zebra -r -b
>
> --
> Frédéric
>
>
>
>
_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha
Reply | Threaded
Open this post in threaded view
|

Re: How to delete a record after entering a rare unicode character

Zeno Tajoli
In reply to this post by Marc Nürnberger-2
Hi,

> On koha 3.0.3 we edited a title of a record, inserting the following
> unicode charachter 𡼱 [it's a rare Chinese character][Decimal: 139057;
> UTF-8: F0 A1 BC B1] from unicode.org. In the input field it looked
> just fine. But after saving the record, we got a fatal error message
> and the record became inaccesible.

as I know, you need to delete the char.
I suggest you to delete it with a MySQL GUI tool.
I use SQLyog http://www.webyog.com/en/index.php.
Probably the freeware edition is enough for this task.

Bye
Zeno Tajoli
_______________________________________________
Koha mailing list
[hidden email]
http://lists.katipo.co.nz/mailman/listinfo/koha