Node Relativity can't handle underscores in content type names
| Project: | Node Relativity |
| Version: | HEAD |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Inside 'Link operations' a 'Create new Solution' appears, but it doesn't creat the correct content type. Actually, it doesn't create a link at all.
My set-up:
- Drupal 6.12
- Relativity 1.2
I am using custom content types, created with 'admin/content/types/add':
- Conflict (content_ct)
- Solution (solution_ct)
In this case, it should be possible to attach one solution to different conflicts.
Node relativity, Regular settings:
- Node types that can be involved in relationships: Conflict & Solution
Options for Conflict (conflict_ct) nodes:
- Parental Ordinality: none
- Allowable Child Node types: Solution
Options for Solution (solution_ct) nodes:
- Parental Ordinality: one or more
- Allowable Child Node types: [nothing]
Symptom
The following links are correctly displayed in 'Link operations':
- Create new Solution (node/add/solution_ct/parent/2)
- Attach existing Solution (relativity/listnodes/solution_ct/parent/2)
But the 'Create new solution' does not send me to a 'Create Solution' page, but to a generic 'Create content' page, that looks like 'node/add' without the option of adding a solution_ct. (Note, that it is correct not to show 'solution_ct' in this list, because I disabled "orphan" nodes for this type in Parental Ordinality. But I shouldn't be shown this list in this context, in the first place!)
When I create one of the listed content types, I get exactly that, a new node of this other content type, and it does not get linked to the "parent" node (which is correct, because I didn allow these types in 'Allowable Child Node types').
I've tested this with different user roles, all have the rights to create 'solution_ct' content.

#1
I found something strange that might cause this bug:
The name on the "real" link that creates a node on my site is somehow mangled with. It replaces the underscore for a dash: node/add/solution-ct.
The Node relativity module is attempting to create a new node with the straight content type name, without replacement: node/add/solution_ct/parent/2
Hope this helps!
Cheers,
Jerzy
#2
I've just been able to confirm that this bug has to do with underscores in the content type names:
I've changed the title of this bug report, to better reflect the nature of this issue.
#3
Busted! ;)
This module kicks so much ass, but I was pulling my hair out due to this bug. I concur. I changed my content type to not have underscores, and everything seems to work peachy.
I suppose this isn't "critical" but I think that a short-term fix in the form of a note somewhere letting people know that they can't have underscores in the content type names is pretty crucial.
Thanks for all the work on this module.
#4
I created this book page in the Node Relativity documentation, explaining that you need to remove underscores from content type names for the time being. Hope that was OK!
http://drupal.org/node/506364
#5
Have a fix for this issue that I hope to post as patch today.
#6
I created a patch and used it well.
#7
I encountered this problem as well, and I created patches for both 6.x-1.x-dev and HEAD, which I'm attaching. I'm setting the version to HEAD, hoping that this will be picked up sooner :)
#8
Fixed in 6.x-1.x-dev. For 5, please submit a patch against 5.x-2.x-dev, not HEAD. Thanks.
#9
has this actually been included? I downloaded dev 7/11 and I still had to apply the patch.
The patch in #7 did not solve my issue :(
#10
Patch #6 did work :) thanks!
#11
Both patch #6 and the module are wonderful! Thanks.
Laura
#12
Automatically closed -- issue fixed for 2 weeks with no activity.