Error message when deleting DOI

Project:RUcore dlr/EDIT
Version:7.2
Component:Code
Category:bug report
Priority:normal
Assigned:triggs
Status:closed
Description

rutgers-lib:201374

The state was "reserved". I deleted DOI, got the message. Testing the state of DOI indicates that it has been deleted.

Why was this message displayed?

XML Parsing Error: junk after document element
Location: <a href="http://rep-test.libraries.rutgers.edu/dlr/EDIT/DOI/rundoi.php?pid=rutgers-lib%3A201374&amp;function=delete&amp;statechange=unavailable&amp;reason=Testing" title="http://rep-test.libraries.rutgers.edu/dlr/EDIT/DOI/rundoi.php?pid=rutgers-lib%3A201374&amp;function=delete&amp;statechange=unavailable&amp;reason=Testing">http://rep-test.libraries.rutgers.edu/dlr/EDIT/DOI/rundoi.php?pid=rutger...</a>
Line Number 2, Column 1:<b>Warning</b>: file_get_contents(<a href="http://rep-test.libraries.rutgers.edu/dlr/EDIT/INT/geptfedorarest.php?pid=rutgers-lib:201374&amp;mimetype=text/xml&amp;dslocation=http://rep-test.libraries.rutgers.edu/dlr/EDIT/DOI/modstextfile.xml&amp;dsid=MODS&amp;version=yes&amp;view=chds&amp;logmessage=dlr/EDIT+user+deleted+DOI" title="http://rep-test.libraries.rutgers.edu/dlr/EDIT/INT/geptfedorarest.php?pid=rutgers-lib:201374&amp;mimetype=text/xml&amp;dslocation=http://rep-test.libraries.rutgers.edu/dlr/EDIT/DOI/modstextfile.xml&amp;dsid=MODS&amp;version=yes&amp;view=chds&amp;logmessage=dlr/EDIT+user+deleted+DOI">http://rep-test.libraries.rutgers.edu/dlr/EDIT/INT/geptfedorarest.php?pi...</a>): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

Comments

#1

I noticed that error message too. I left it so that you would notice it too. I think the delete actually works, but something is returning the error anyway and in a non-XML format. I was expecting an XML return and thus output an XML header for that function. I'm not sure why the getfedorarest.php could not find a MODS record to change. I'll try to repeat the error.

#2

Status:active» test

I found it - a one-character typo that was screwing up the replacement of the MODS without the DOI identifier. Good bug! Thanks!

#3

Status:test» active

I can't create DOI for rutgers-lib:201374 (same record I used to delete DOI).

Create DOI gives "This object already has a DOI."

Test DOI gives "A target URI and/or DOI could not be obtained."

View the current DOI metadata gives "Publication year was not found or is in an invalid format for rutgers-lib:201374."

These messages are confusing. I was not expecting a DOI so "Create DOI" option should not have displayed the message shown above; view current DOI should not state "Publication year was not found..."

#4

Status:active» test

This message occurs when a doi identifier is found already in the MODS. This part is my code. Since the typo bug prevented the MODS from being changed after the DOI was deleted, the MODS for that test object probably still has the DOI and the program will not let you create another. I suggest editing the MODS by hand, removing the old doi line, and trying again to create and delete. I was able to do that on the object I tested, which had the same problem before the typo bug was fixed.

#5

Status:test» active

Thanks for the explanation. I followed your instructions and deleted DOI in the identifier field.

1)When I commited the changes, I got:
Updating object DOI...
400
Publication year was not found or is in an invalid format for rutgers-lib:201374.

QUESTION: Why was this message displayed ,when I was deleting the doi?

2) When I went to add originInfo, I noticed that I have to remove the identifier type "doi" from MODS. So I deleted it and added:

[mods:originInfo]
[mods:dateCreated encoding="iso8601" point="start" qualifier="approximate"]2011[/mods:dateCreated]
[/mods:originInfo]

Saving the record gives:
Updating object DOI...

400
[

QUESTION: Why are these two lines displayed? Where are they coming from?
3) Created DOI. Thes state was "not public". Testing the state of DOI, shows me the doi but does not tell me the state (reserved, in this case).
4) Delete DOI: I deleted the DOI. No error message displayed. DOI metadata was removed from MODS.

#6

I can try to make that a little less confusing. Assuming an object with a doi, when the MODS is edited, it tries to run the update method on the doi to keep the metadata in sync. In the case of a deleted doi, this fails - hence the 400. It is harmless, but I should probably check that there is still a doi in the new mods before attempting this step. I'll put that in and get back to you for a test.

#7

Status:active» test

I set this so that the doi update only runs when there is a doi identifier in the MODS. Otherwise only the reindex message appears. Editing a title or other bit shows up right away with EZID if there is a doi.

#8

Status:test» closed

I was able to delete DOI for rutgers-lib:201079 without any problems. I was also able to create DOI for this object after deleting.

Back to top