"Enforce Parental Rules" does not work

kirilius - December 8, 2007 - 05:35
Project:Node Relativity
Version:5.x-2.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community
Description

I have a node type A and node type B. The relationship between them is:
- one node of type A can have multiple child nodes of type B
- a B-node can have only one parent of type A
- a B-node cannot have any children
... a typical one-to-zero-one-or-many relationship

I have the "Enforce Parental Rules" checkbox checked in relativity advanced settings. The description of this checkbox says "If checked, nodes cannot be created without a parent if they require a parent to exist."

Nevertheless I can create a node of type B without any problems and nothing stops me from doing this.
Is this a bug or I am doing something not right?

#1

kirilius - December 11, 2007 - 05:28

Any comments here? To me this seems a serious bug or malfunction.

#2

Daryljames - December 16, 2007 - 00:24

I'm seeing exactly the same thing have you found a fix?

#3

jhedstrom - February 26, 2008 - 02:13
Status:active» needs review

Attached is a patch that seems to have fixed the issue. It seems that the loop through where this is checked was using the human readable type name rather than the machine name. Note, the patch is for the dev version.

AttachmentSize
relativity.module.patch 862 bytes

#4

carbo18 - May 1, 2008 - 14:05

This patch still doesn't seem to solve the issue with the dev version or any 5.x version.

#5

folkertdv - June 3, 2008 - 12:56

It did the trick here. Neat patch.
Applied the patch, went to the Advanced Settings page, made sure "Enforce Parental Rules" was checked, submitted the Advanced Settings, and afterwards node/add/[enforced type] was no longer authorized.
(using the latest 5.x dev)

#6

tacituseu - July 21, 2009 - 19:07
Status:needs review» reviewed & tested by the community

Still present in 5.x-2.5, re-rolled with minor changes

AttachmentSize
relativity.patch 786 bytes

#7

tacituseu - July 23, 2009 - 16:05
Version:5.x-2.2» 5.x-2.5
Component:Miscellaneous» Code
 
 

Drupal is a registered trademark of Dries Buytaert.