Details
Description
There are 2 errors here, the node_id on relations should return NULL when the object is trashed.
And the node_id should be updated when the object is republished.
There is maybe a third bug also: When restoring a object I got the same node_id as it had from before. But after I tried again when publishing a new node while the original was in trash, it got a new node when restoring it.
Steps to reproduce
1. delet (to trash) a object that is object related in another object (I have only testet object relations list, but probably goes for all relations)
2. do something like this in node template for the node that is reverse related:
{$node.data_map.object_list.content.relation_list.index_of_trashed_node.node_id}
- Bug1: it's not showing NULL on node_id like the object does on main_node_id if you fetch it
3. restore the object, if it gets a new node (as mentioned above it sometime doesn't) check the code from #2. - Bug2: The node_id is unchanged even if the object gets a new one