Hello,

First of all very nice module, thank You!
When i delete a node from administer->content the relativity table should cleaned up, if the deleted node was a parent or a child the relation should be removed.

regards!

CommentFileSizeAuthor
#2 relativity_6.patch463 bytesowahab

Comments

JohnG-1’s picture

Version: 4.7.x-1.x-dev » master

Yeah this has been annoying me too. The dirty database I mean - not the module ( ... Relativity Rocks! :)

owahab’s picture

StatusFileSize
new463 bytes

The implementation of hook_nodeapi() in relativity has a problem: it assumes that node's parent id will be passed via GET or POST which won't happen in your case, Lebowski.
Plus I checked and found there's an useless, IMO, if statement.
I have done this small patch but didn't test it so please do so and let me know.

JohnG-1’s picture

Status: Active » Needs review

+1 quick test indicates this patch allows proper deletion of the relationship from relativity table when a either the parent or child node is deleted. Thanks Omar :)

hbfkf’s picture

Subscribe.

darius’s picture

Status: Needs review » Fixed

Omar, I think that $node->parent_node gets set in the "load" case. Still, it is probably safe to remove the "if" clause, so that entries where a node has no parents can still get removed. The code was originally written by javanaut, so I don't always understand why things are the way they are...

Committed to the CVS HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)