Closed pprw closed 1 year ago
It's a puzzling error given that the import doesn't really do anything interesting with resource owner. It just assigns the resource to the user who started the import. I haven't encountered this error during my extensive testing, so troubleshooting could be tricky.
These kinds of errors can happen due to an incompatibility with another module. Try deactivating every module but OSII and running another import. That may fix it.
Another thing you could try is open the file ResourceOwner.php and comment out this line:
// $localResource['o:owner']['o:id'] = $this->getJob()->getJobEntity()->getOwner()->getId();
Save and run another import. It could be that the job owner is not getting merged back into the entity manager after clearing it. This would account for a "A new entity was found" error. But it still wouldn't explain why no one else has had the same error.
I tried both deactivate all modules but Osii and commenting the line in ResourceOwner.php.
Same problem in both cases.
Yes, quite puzzling. Can you share the remote API that you're attempting to import? It'll be much easier to fix if I can reproduce the error.
@pprw We successfully reproduced the error using the API endpoint you provided. However, we're having a hard time finding an explanation. It's probably not related to the ResourceOwner mapper, or to an un-merged job owner. The error appears to happen when importing the last item (#2723) with values. We're looking possible reasons. We'll keep you updated on our progress.
I tried to exclude item #2723 from the imported content.
Without this item, import completed without error.
This item contains value annotations binden to dcterms:title (two URI)
Yes, value annotations are definitely the culprit, but for a rather esoteric reason. We should have a fix in the coming days.
The simulated-clear branch should fix the bug. Feel free to check it out and confirm that the import works. You should probably first delete the items, media, and item sets from your original import. That's as easy as clicking on the "View..." links in the "Manage import" sidebar and batch deleting them.
At any rate, we're going to continue testing the branch and make a bugfix release by the end of the week.
I just tested and I can confirm it is working with the simulated-clear branch
Thanks!
@pprw Thank you for reporting the bug and testing the fix. We've make a new release. It should be published tomorrow.
After successfully imported 200 items, Osii fails to import metadata for the other ones (media are imported though)
Omeka S version 4.1.0-alpha5 (master) (harvested Omeka S is 3.2.1 Omeka S Item Importer version 1.2.0