D7 port for CCK/fields is not yet done.

I see this in signup.module, meaning that a lot of field work has not yet been done.

        if (module_exists('content')) {
          // Due to a bug in CCK (http://drupal.org/node/363456), we need
          // to call this function twice to ensure we get the real value.
          // The bug is present when you first enable the setting to
          // display in the node instead of a separate tab, or when you
          // first upgrade to the version that contains this code.
          content_extra_field_weight($node->type, 'signup_node_info');
          $weight = content_extra_field_weight($node->type, 'signup_node_info');
        }
        else {
          $weight = variable_get('signup_info_node_weight_' . $node->type, 10);
        }
        $node->content['signup'] = array(
          '#markup' => $signup_info,
          '#weight' => $weight,
        );

Unfortunately I wasn't able to get signup working at all.

Comments

ezra-g’s picture

Title: D7: still relying on content.module » Remove code referring to content.module

Looking at that hunk of code, Signup is not depending on Content as a requirement, but looks for content.module in order to set the weight of the Signup content in the node. So, it seems like this code should be removed.

I and other folks from #808310: Initial Drupal 7 port of signup module have at least basic signup functionality working - Could you elaborate on what went wrong with "Unfortunately I wasn't able to get signup working at all." :) ?

rfay’s picture

I set up a content type with a date field.

Configured signup, configured signup to be active on the content type

Created a node.

On view, regardless of permissions, there is no signup option.

Thanks for looking at this! I figured it was just an incomplete port.

ezra-g’s picture

Did you look at the full page view of the node, or just the teaser?

rfay’s picture

Full page build. That's why I was looking in the view hook to see what was wrong. When I found the D6 code, I bailed. Didn't know the magic to replace it.

btmash’s picture

@rfay, please take a look at #1112496: Show signup in the display ui for a node type - it tackles this issue.

greggles’s picture

Title: Remove code referring to content.module » Allow users to weight the signup field

Re-titling based on discussion.

hook_field_extra_fields is what you want to set the weight of signup on a node.

The user profile setting for comment notify (so, on a user instead of a node...slightly different) was fixed in #1176546: Make user profile setting available in Manage Fields.

sgabe’s picture

Status: Active » Closed (duplicate)