Now I could be wrong here, but:

(v 1.21.2.6 2006/08/27 05:43:18 darius - http://ftp.osuosl.org/pub/drupal/files/projects/relativity-4.7.0.tar.gz )

I downloaded this module, and couldn't figure out why no controls (or HTML at all) was being displayed when I edited a node that should have relativity enabled (in order to add child nodes).

The code I got included the case "form pre" when testing the $op variable in the implementation of relativity_nodeapi(). This also seems to be present in CVS under head. As far as I can tell, "form pre" is no longer a valid case for the $op variable in hook_nodeapi (http://api.drupal.org/api/4.7/function/hook_nodeapi). It seems like this module hasn't been converted to 4.7 yet.

Attached is a patch that implements hook form_alter() for relativity.module. It isn't perfect, but it at least enables the UI for this module - seems like a critical piece.

CommentFileSizeAuthor
relativity_form_alter.php.txt912 bytesgreenmachine

Comments

darius’s picture

Priority: Critical » Minor

You're right about the "form pre" being obsolete. In the case of relativity.module, this results in a dead code with no adverse effects, as far as I can tell (the "if" case never gets executed). I will fix this.

The relativity module is working for Drupal 4.7. I (and other people) have been using it since the moment Drupal 4.7 was released. Which version of Drupal are you using? The module was tested up to 4.7.3.

BTW, the "Related Actions" fieldset (which displays links to attach child nodes and delete existing relationships) appears upon *viewing* the node, not editing it. Just make sure you have the right permissions.

Darius

steveparks’s picture

I'm seeing a similar issue with the controls not being displayed on audio or CCK nodes. It displays ok on simple page or story nodes however, which is odd.

Other modules have been able to inject their code at the bottom of my audio nodes. Forward and User-review have both worked ok.

I'm looking forward to using this module, so I'll keep watching this issue to see how it gets resolved. thanks

cheers
steve

steveparks’s picture

hmmm. this patch didn't fix it for me. do i simply insert it in relativity.module as is? I don't need to change anything else?

If that's the case then my problem must be something different.
Sorry to butt in on this issue!

greenmachine’s picture

Thanks for the follow up. I am using CCK content types, which is why I must not have seen the "related actions" HTML (as our friend here has reported) when viewing the node. I have custom node phptemplate files for the CCK content types (as I think most people using CCK do), so I'm not using the $content variable. I think that further explains it.

Steve, I think you should be able to insert that function whole-hog into Relativity.module and get the links to show up on the Edit page. It's not perfect code, though, so no guarantees.

steveparks’s picture

aha, perhaps there's more similarity between our issues then. I'm also using custom phptemplate node tpl files for these content types.

That code still doesn't make the relativity actions/relatives boxes show up on the node view page for me though.

Is there some them function we can override, or something we can insert in our custom phptemplate tpl files to make these boxes show up?

thanks
steve

darius’s picture

Status: Active » Fixed

The bug is fixed in version 5.0, and harmless in 4.7.

About displaying relativity links in CCK, check http://drupal.org/node/104649

Anonymous’s picture

Status: Fixed » Closed (fixed)