Hi Jindrich,
In data martedì 8 dicembre 2009 13:33:48, Jindrich Dolansky ha scritto:
> Hello,
>
> I have a problem with BibEdit modul. When I try to add a new field, this
> field is uploaded as controlfield insted of datafield, and thus it is not
> shown within the corresponding metadata record.
> [...]
> <record>
> <controlfield tag="001">7013</controlfield>
> <controlfield tag="246">[('a', 'Alternative title')]</controlfield>
> <datafield tag="041" ind1="0" ind2="7">
> <subfield code="a">cze</subfield>
> </datafield>
> [...]
Am I right in guessing you are using CDS-Invenio-0.99.1? If this is the case,
and if I remember correctly, I think we have already encountered this bug and
it's fixed in the GIT repository at:
<http://cdsware.cern.ch/repo/?p=personal/cds-invenio-
sam.git;a=commitdiff;h=d66492f5ca76dccc0faa3caa6f0763c7dee405d8>
Try to apply the patch I'm attaching.
For this, you can save your patch in your /tmp directory and do:
$ cd /opt/cds-invenio/lib/python/invenio # or where your installation is.
$ sudo cp bibedit_engine.py bibedit_engine.py-backup # let's make a backup
$ sudo patch --dry-run -p4 < /tmp/bibedit_engine.patch
$ # if no errors
$ sudo patch -p4 < /tmp/bibedit_engine.patch
$ sudo /etc/init.d/apache2 restart # or whatever it is used to restart apache
That's it!
I hope this solves your problem.
Best regards,
Samuele
--
Samuele Kaplun ** CERN Document Server ** <http://cds.cern.ch/>
diff --git a/modules/bibedit/lib/bibedit_engine.py b/modules/bibedit/lib/bibedit_engine.py
index cf4b5bf..5658ca5 100644
--- a/modules/bibedit/lib/bibedit_engine.py
+++ b/modules/bibedit/lib/bibedit_engine.py
@@ -95,7 +95,7 @@ def perform_request_index(ln, recid, cancel, delete, confirm_delete, uid, temp,
if tag != '' and subcode != '' and value != '':
#add these in the record, take the instance number
tag = tag[:3]
- new_field_number = record_add_field(record, tag, ind1, ind2, datafield_subfield_code_value_tuples=[(subcode,value)])
+ new_field_number = record_add_field(record, tag, ind1, ind2, [(subcode,value)])
record = add_subfield(recid, uid, tag, record, new_field_number, subcode, value)
if another and another != '':
#if the user pressed 'another' instead of 'done', take to editing