From: Alfons Wittmann <alfons.wittmann AT ku-eichstaett.de>
Date: Thu, 25 Jun 2009 15:39:42 +0200
| Threading: | • This Message → [EP-tech] Re: Modify type of meta field in live archive from yurj AT alfa.it → [EP-tech] Re: Modify type of meta field in live archive from alfons.wittmann AT ku-eichstaett.de → [EP-tech] Re: Modify type of meta field in live archive from yurj AT alfa.it → [EP-tech] Re: Modify type of meta field in live archive from tdb2 AT ecs.soton.ac.uk → [EP-tech] Re: Modify type of meta field in live archive from alfons.wittmann AT ku-eichstaett.de |
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
EPrints 3.1.1
Hi all,
I have to modify the type of an existing meta field in a live archive:
I want to have the field "pages" with type "text" instead ↵
of "int".
What I've done so far (on a test server):
- ALTER TABLE `archiveid`.`eprint` MODIFY COLUMN `pages` TEXT ...
- UPDATE archiveid.mf SET type = "text" WHERE metafieldid = ↵
"eprint.pages"
- modify "/archiveid/cfg/cfg.d/eprints.pl"
'name' => 'pages',
'type' => 'text',
- run "epadmin reorder archiveid metafield"
- restart Apache
Now it's possible to enter entries like "VI, 234" in pages, and they ↵
are
saved in database, but there are still errors in Apache error_log:
Argument "IV, 123" isn't numeric in sprintf at
/opt/eprints3/perl_lib/EPrints/MetaField/Int.pm line 96.
at /opt/eprints3/perl_lib/EPrints/MetaField/Int.pm line 96
EPrints::MetaField::Int::ordervalue_basic('EPrints::MetaField::Int=HASH(0xb9212c2c)',
'IV, 123'
Any hints? Or isn't it possible to change the type of an existing field?
Apologies if this has already been answered before but I couldn't find
anything on it.
Cheers, Alfons
Alfons Wittmann
--
Universitätsbibliothek Eichstätt-Ingolstadt
EDV-Referat Tel: 08421/93-1486 - Fax: 08421/93-1791
Universitätsallee 1 EMail: alfons.wittmann AT ku-eichstaett.de
85071 Eichstätt http://www.ku-eichstaett.de/Bibliothek/
From: Yuri <yurj AT alfa.it>
Date: Thu, 25 Jun 2009 16:42:38 +0200
| Threading: | ↑ [EP-tech] Modify type of meta field in live archive from alfons.wittmann AT ku-eichstaett.de • This Message |
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Alfons Wittmann ha scritto:
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** EPrints community wiki - http://wiki.eprints.org/
> EPrints 3.1.1
>
> Hi all,
>
> I have to modify the type of an existing meta field in a live archive:
> I want to have the field "pages" with type "text" ↵
instead of "int".
>
> What I've done so far (on a test server):
> - ALTER TABLE `archiveid`.`eprint` MODIFY COLUMN `pages` TEXT ...
> - UPDATE archiveid.mf SET type = "text" WHERE metafieldid = ↵
"eprint.pages"
> - modify "/archiveid/cfg/cfg.d/eprints.pl"
> 'name' => 'pages',
> 'type' => 'text',
> - run "epadmin reorder archiveid metafield"
> - restart Apache
>
> Now it's possible to enter entries like "VI, 234" in pages, and ↵
they are
> saved in database, but there are still errors in Apache error_log:
>
> Argument "IV, 123" isn't numeric in sprintf at
> /opt/eprints3/perl_lib/EPrints/MetaField/Int.pm line 96.
> at /opt/eprints3/perl_lib/EPrints/MetaField/Int.pm line 96
> ↵
EPrints::MetaField::Int::ordervalue_basic('EPrints::MetaField::Int=HASH(0xb9212c2c)',
> 'IV, 123'
>
> Any hints? Or isn't it possible to change the type of an existing field?
>
did you tell to eprints it is a text field?
From: Alfons Wittmann <alfons.wittmann AT ku-eichstaett.de>
Date: Thu, 25 Jun 2009 16:55:43 +0200
| Threading: | ↑ [EP-tech] Modify type of meta field in live archive from alfons.wittmann AT ku-eichstaett.de • This Message |
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Yuri wrote:
>> I have to modify the type of an existing meta field in a live archive:
>> I want to have the field "pages" with type "text" ↵
instead of "int".
>>
>> What I've done so far (on a test server):
>> - ALTER TABLE `archiveid`.`eprint` MODIFY COLUMN `pages` TEXT ...
>> - UPDATE archiveid.mf SET type = "text" WHERE metafieldid = ↵
"eprint.pages"
>> - modify "/archiveid/cfg/cfg.d/eprints.pl"
>> 'name' => 'pages',
>> 'type' => 'text',
>> - run "epadmin reorder archiveid metafield"
>> - restart Apache
>>
>> Now it's possible to enter entries like "VI, 234" in pages, ↵
and they are
>> saved in database, but there are still errors in Apache error_log:
>>
>> Argument "IV, 123" isn't numeric in sprintf at
>> /opt/eprints3/perl_lib/EPrints/MetaField/Int.pm line 96.
>> at /opt/eprints3/perl_lib/EPrints/MetaField/Int.pm line 96
>> ↵
EPrints::MetaField::Int::ordervalue_basic('EPrints::MetaField::Int=HASH(0xb9212c2c)',
>> 'IV, 123'
>>
>> Any hints? Or isn't it possible to change the type of an existing ↵
field?
>>
>
> did you tell to eprints it is a text field?
How to do that? I modified
"/archiveid/cfg/cfg.d/eprint-fields.pl" (error in my previous ↵
posting!)
'name' => 'pages',
'type' => 'text',
what else?
Thanks!
Alfons Wittmann
--
Universitätsbibliothek Eichstätt-Ingolstadt
EDV-Referat Tel: 08421/93-1486 - Fax: 08421/93-1791
Universitätsallee 1 EMail: alfons.wittmann AT ku-eichstaett.de
85071 Eichstätt http://www.ku-eichstaett.de/Bibliothek/
From: Yuri <yurj AT alfa.it>
Date: Thu, 25 Jun 2009 17:43:24 +0200
| Threading: | ↑ [EP-tech] Modify type of meta field in live archive from alfons.wittmann AT ku-eichstaett.de • This Message |
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
Alfons Wittmann ha scritto:
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** EPrints community wiki - http://wiki.eprints.org/
> Yuri wrote:
>
>>> I have to modify the type of an existing meta field in a live ↵
archive:
>>> I want to have the field "pages" with type ↵
"text" instead of "int".
>>>
>>> What I've done so far (on a test server):
>>> - ALTER TABLE `archiveid`.`eprint` MODIFY COLUMN `pages` TEXT ...
>>> - UPDATE archiveid.mf SET type = "text" WHERE ↵
metafieldid = "eprint.pages"
>>> - modify "/archiveid/cfg/cfg.d/eprints.pl"
>>> 'name' => 'pages',
>>> 'type' => 'text',
>>> - run "epadmin reorder archiveid metafield"
>>> - restart Apache
>>>
>>> Now it's possible to enter entries like "VI, 234" in ↵
pages, and they are
>>> saved in database, but there are still errors in Apache error_log:
>>>
>>> Argument "IV, 123" isn't numeric in sprintf at
>>> /opt/eprints3/perl_lib/EPrints/MetaField/Int.pm line 96.
>>> at /opt/eprints3/perl_lib/EPrints/MetaField/Int.pm line 96
>>> ↵
EPrints::MetaField::Int::ordervalue_basic('EPrints::MetaField::Int=HASH(0xb9212c2c)',
>>> 'IV, 123'
>>>
>>> Any hints? Or isn't it possible to change the type of an existing ↵
field?
>>>
>>>
>> did you tell to eprints it is a text field?
>>
>
> How to do that? I modified
> "/archiveid/cfg/cfg.d/eprint-fields.pl" (error in my previous ↵
posting!)
> 'name' => 'pages',
> 'type' => 'text',
>
> what else?
>
Restart eprints. If you've a recent version of eprints, run the "epadmin
update_database_structure" command, it may help
.
From: Tim Brody <tdb2 AT ecs.soton.ac.uk>
Date: Thu, 25 Jun 2009 17:07:49 +0100
| Threading: | ↑ [EP-tech] Modify type of meta field in live archive from alfons.wittmann AT ku-eichstaett.de • This Message |
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** EPrints community wiki - http://wiki.eprints.org/
On Thu, 2009-06-25 at 16:55 +0200, Alfons Wittmann wrote:
> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** EPrints community wiki - http://wiki.eprints.org/
> Yuri wrote:
> >> I have to modify the type of an existing meta field in a live ↵
archive:
> >> I want to have the field "pages" with type ↵
"text" instead of "int".
> >>
> >> What I've done so far (on a test server):
> >> - ALTER TABLE `archiveid`.`eprint` MODIFY COLUMN `pages` TEXT ...
> >> - UPDATE archiveid.mf SET type = "text" WHERE ↵
metafieldid = "eprint.pages"
> >> - modify "/archiveid/cfg/cfg.d/eprints.pl"
> >> 'name' => 'pages',
> >> 'type' => 'text',
> >> - run "epadmin reorder archiveid metafield"
> >> - restart Apache
> >>
> >> Now it's possible to enter entries like "VI, 234" in ↵
pages, and they are
> >> saved in database, but there are still errors in Apache ↵
error_log:
> >>
> >> Argument "IV, 123" isn't numeric in sprintf at
> >> /opt/eprints3/perl_lib/EPrints/MetaField/Int.pm line 96.
> >> at /opt/eprints3/perl_lib/EPrints/MetaField/Int.pm line 96
> >> ↵
EPrints::MetaField::Int::ordervalue_basic('EPrints::MetaField::Int=HASH(0xb9212c2c)',
> >> 'IV, 123'
> >>
> >> Any hints? Or isn't it possible to change the type of an existing ↵
field?
> >>
> >
> > did you tell to eprints it is a text field?
>
> How to do that? I modified
> "/archiveid/cfg/cfg.d/eprint-fields.pl" (error in my previous ↵
posting!)
> 'name' => 'pages',
> 'type' => 'text',
Hi,
I just tried what you did on a trunk version and it works ok.
From: Alfons Wittmann <alfons.wittmann AT ku-eichstaett.de>
Date: Thu, 25 Jun 2009 19:20:31 +0200
| Threading: | ↑ [EP-tech] Modify type of meta field in live archive from alfons.wittmann AT ku-eichstaett.de • This Message |
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** EPrints community wiki - http://wiki.eprints.org/ Tim Brody schrieb am 25.06.2009 18:07: >> >> I have to modify the type of an existing meta field in a live ↵ archive: >> >> I want to have the field "pages" with type ↵ "text" instead of "int". >> >> >> >> What I've done so far (on a test server): >> >> - ALTER TABLE `archiveid`.`eprint` MODIFY COLUMN `pages` TEXT ↵ ... >> >> - UPDATE archiveid.mf SET type = "text" WHERE ↵ metafieldid = "eprint.pages" >> >> - modify "/archiveid/cfg/cfg.d/eprint-fields.pl" >> >> 'name' => 'pages', >> >> 'type' => 'text', >> >> - run "epadmin reorder archiveid metafield" >> >> - restart Apache > > I just tried what you did on a trunk version and it works ok. I tried it again, and there were no more errors - don't know why, perhaps I forgot to save eprint-fields.pl before restarting Apache. Thanks again, Alfons -- Universitätsbibliothek Eichstätt-Ingolstadt EDV-Referat Tel: 08421/93-1486 - Fax: 08421/93-1791 Universitätsallee 1 EMail: alfons.wittmann AT ku-eichstaett.de 85071 Eichstätt http://www.ku-eichstaett.de/Bibliothek/