Purge relationship not deleting the relationship

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

When trying to purge a rels statement through dlr/EDIT

<a href="http://rep-test.libraries.rutgers.edu/dlr/EDIT/nmanagerelsindex.php?pid=rutgers-lib:25129" title="http://rep-test.libraries.rutgers.edu/dlr/EDIT/nmanagerelsindex.php?pid=rutgers-lib:25129">http://rep-test.libraries.rutgers.edu/dlr/EDIT/nmanagerelsindex.php?pid=...</a>

The purge is not committing. The relationship still exists after initiating the command.

Comments

#1

Project:RUcore dlr/EDIT» RUcore API's
Version:7.0» 7.0
Component:Code» Relationship API
Assigned to:triggs» chadmills
Status:active» under review

I do not think this is an issue. I was able to create a brand new relationship and delete it with no problems. I think I was testing the deleting using some very early, and incorrectly submitted, rels object statements.

An example is the relationship between rutgers-lib:25129 and rutgers-lib:25527 is expressed as:
[subject] => info:fedora/rutgers-lib:25129
[predicate] => info:fedora/fedora-system:def/relations-external#hasAnalytic
[object] => rutgers-lib:25527

it should be
[subject] => info:fedora/rutgers-lib:25129
[predicate] => info:fedora/fedora-system:def/relations-external#hasAnalytic
[object] => info:fedora/rutgers-lib:25527

I ma moving this to the Relationship API for further investigation.

#2

Project:RUcore API's» RUcore dlr/EDIT
Version:7.0» 7.0
Component:Relationship API» Code
Assigned to:chadmills» triggs
Status:under review» active

There may be something odd with this. I added 1743 and then purged it. I also added 1376, but saw two rels for 1376. I purged one and it purged the relationship, though it still listed the other zombie relationship and I could not get that to go away with a simple purge. The code is this:
else if ($action == "purge") {
$ch = curl_init();//initialize cURL
curl_setopt($ch, CURLOPT_URL, "http://$rucorebase/api/relationship/");
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');//set custom request
curl_setopt($ch, CURLOPT_POSTFIELDS, "do=delete&key=$apikey&subject=$pid&predicate=$relationship&object=$object");
curl_setopt ($ch, CURLOPT_FRESH_CONNECT, TRUE);
curl_exec($ch);

if(!curl_errno($ch)) {
print_r(curl_getinfo($ch));
}
curl_close($ch);
}

#3

Status:active» test

I suspect this was a one off case.

#4

Status:test» fixed

Tested by purging a relationship.

#5

Status:fixed» closed

Closing.

Back to top