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.

Comments

jjalocha’s picture

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

jjalocha’s picture

Title: Impossible to 'Create new' node » Node Relativity can't handle underscores in content type names

I've just been able to confirm that this bug has to do with underscores in the content type names:

  • The way Node relativity tries to add a node doesn't work: node/add/solution_ct/parent/2
  • Simply modifying this address according to the way Drupal handles them, creates the node, as desired: node/add/solution-ct/parent/2

I've changed the title of this bug report, to better reflect the nature of this issue.

mry4n’s picture

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.

mry4n’s picture

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

threexk’s picture

Have a fix for this issue that I hope to post as patch today.

livido’s picture

StatusFileSize
new1.14 KB

I created a patch and used it well.

svdoord’s picture

Version: 6.x-1.2 » master
Status: Active » Needs review
StatusFileSize
new1.06 KB
new1 KB

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 :)

darius’s picture

Status: Needs review » Fixed

Fixed in 6.x-1.x-dev. For 5, please submit a patch against 5.x-2.x-dev, not HEAD. Thanks.

socialnicheguru’s picture

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 :(

socialnicheguru’s picture

Patch #6 did work :) thanks!

lhernon’s picture

Both patch #6 and the module are wonderful! Thanks.

Laura

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.