[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] bulk import terminates with <rev_number>0</rev_number>



Hi Thomas,

It may be worth taking a look at the current version of make_orderkey.pl 
(the same as what was released for 3.4.4):

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fblob%2Fmaster%2Flib%2Fcfg.d%2Fmake_orderkey.pl&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C9e81895423564e20824308db719f791f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638228701958172626%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=MPqDlUcn2m2Y2IYwknCvwMLC9DgYGdMI1nW4HXb%2BtFQ%3D&reserved=0

Also, take a look at its history to see of there are any changes that 
may have caused you archive's configuration to become incompatible:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fcommits%2Fmaster%2Flib%2Fcfg.d%2Fmake_orderkey.pl&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C9e81895423564e20824308db719f791f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638228701958172626%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=gOQwSOa%2FCrTLTLJiBI0DwucP4L86iHgeAmmdsl18Hr8%3D&reserved=0

However, I cannot see anything in the config/code you provided that 
could cause the error you report.? However, I can see that the latest 
version of make_orderkey.pl does have a number of calls like this:

/&$c->{make_orderkey_ignore_extras}/

If you had some how removed or did not have 
$c->{make_orderkey_ignore_extras} defined in either your archive 
configuration or in some EPrints configuration directory where it is not 
overridden by the same filename at an archive level, then this could 
produce the error you reported.? What is the name of the file from which 
you copied the code you put in your previous email?

Regards

David Newman

On 20/06/2023 14:12, th.lauke at arcor.de wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230620/53443d40/attachment.html