[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,

Using the text file you attached with the EPrinst XML I have tested this 
on my dev server running EPrint 3.4.5 and I could import the two records 
using he "EPrints XML" importer from a web browser.? I did get a few 
warnings messages about unrecognised entities (all three appeared twice):

Invalid XML element: repository
Invalid XML element: folder
Invalid XML element: FKZ

I was similar able to import these on a 3.4.4 repository although this 
has local modification, which may have fixed the issue.? However, the 
issue you are reporting does not sound familiar to me, so I don't think 
it is something purposefully fixed for 3.4.5.? Two places worth checking 
are the known issues section for 3.4.4:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEPrints_3.4.4%23Known_Issues&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C94b16b58fa7244a49d8a08db717673a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638228525771803419%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=L%2FSI0uTGBsGZgidO7T3suO6Kcxs05I1QULhSrpPUrog%3D&reserved=0

and all the GitHub issues for 3.4.5:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fissues%3Fq%3Dis%253Aissue%2Bmilestone%253A3.4.5&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C94b16b58fa7244a49d8a08db717673a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638228525771803419%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=WWXWqX7%2BSEmFpF%2FRiWRs7NmczAEApqEiQNS6DTvh4kI%3D&reserved=0+

I cannot see anything related to your issue the former, so it may be 
worth trawling through the latter.? GitHub issues tend to have 
relatively descriptive subjects.

Looking closer at your error message it suggests that there may be 
something in your configuration that is causing the issue.? I would 
probably look for lines like:

$values = &$f( $self, $values, $fieldname );

In particular the '&$' part, which match up with the eval line number.? 
One of the places you might find these are if you are setting something 
that is not a function to a field configuration attribute that must be a 
function.? One such attribute is "fromform".? I think the 
<rev_number>0</rev_number> is due to the fact that EPrints will create 
an initial empty record (dataobj) and then try to add the initial 
metadata provided to create revision number 1.? So it would see the 
issue with the code reference occurs whilst the metadata is be evaluated 
and assigned to the dataobj, this will be before it is saved to create 
revision number 1.

I think that if you remove the fields you are trying to import one by 
one you should be able to isolate the field causing the issue and then 
review its field configuration to figure out what about it is causing 
the problem.

Regards

David Newman



On 20/06/2023 10:09, th.lauke--- via Eprints-tech wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
> Dear all,
>
> currently I have no idea, why following phenomenon occurs:
> The bulk import of the attached file (2 nearly identical entities, but 
> second without creators field) terminates (after first entity is 
> imported, but <rev_number>0</rev_number> set) with
> 'Not a CODE reference at (eval 107) line 42.'
>
> Import of second entity alone works as usual.
>
> What is going wrong in 3.4.4?
>
> Many thanks for any hint in advance
> Thomas
>
> *** Options:http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C94b16b58fa7244a49d8a08db717673a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638228525771803419%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nWABmqnaOuZL6iGzfxp4wUDfgumJhYEE6u3Cla%2FcVCo%3D&reserved=0
> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C94b16b58fa7244a49d8a08db717673a4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638228525771803419%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=wWnLr9SzJZM7kyCEwYXQ7zocOfUVwqX%2BIwlNRt4hseE%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230620/4f33b927/attachment-0001.html