[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] bulk import terminates with <rev_number>0</rev_number>
- Subject: [EP-tech] bulk import terminates with <rev_number>0</rev_number>
- From: th.lauke at arcor.de (th.lauke at arcor.de)
- Date: Tue, 20 Jun 2023 15:12:27 +0200
- In-reply-to: <ad275f40b4cc4c00b46177a867b8e4c5@arcor.de>
- References: <ed6b7d98a46443b0847b7f574cc27758@arcor.de>
CAUTION: This e-mail originated outside the University of Southampton.
Hi David,
many thanks for your immediate and especially helpful reply!
> Looking closer at your error message ... there may be something in your configuration that is causing the issue ...
indeed, but what has changed, that an adaption is necessary?
> I would probably look for lines like: $values = &$f( $self, $values, $fieldname );
commenting
make_single_value_orderkey => 'make_name_orderkey',
for sub_name => 'name',
helped temporarily to overcome the error :)
But when inspecting the respective sub I am somehow lost where to correct the up to now accepted definition:
$c->{make_name_orderkey} = sub
{
my ($field, $value, $session, $langid, $dataset) = @_;
my @orderkey;
foreach( "family", "given", "honourific" )
{
next unless defined($value->{$_}) && $value->{$_} ne "";
my $name = $value->{$_};
# convert name appropriately
my $orderkey = EPrints::Plugin::Text::make_id_orderkey( $name );
push @orderkey, $orderkey;
}
return join( "_" , @orderkey );
};
sub make_id_orderkey
{
my ($name) = @_;
my @orderkey;
# convert to upper case ASCII &
# ignore anything else than alphanumeric characters, aka non-word characters
my $orderkey = uc( unidecode( $name ) );
# ignore anything else than alphanumeric characters, aka non-word characters
$orderkey =~ s/[^_A-Z0-9]//g;
return $orderkey;
};
Could you please point me to some helpful references?
Thanks in advance
Thomas