Thank you for this excellent module - I've found it very useful. I am currently using it to set up a job application and need to provide some explanatory text at the top of the page when they are creating their application. I've tried entering this in the "Explanation or submission guidelines" field of the content type setup, but this doesn't appear when they choose to create or edit their application from the user registration screen. It does appear if I go to /node/add/job-application, but not within the user registration pages. Showing the contents of this field would be very helpful to me.

Thanks!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SeanA’s picture

I just encountered this same problem with nodeprofile. As a workaround, I added an empty fieldset at the top of the form, with my submission guidelines as the fieldset help text. Then I set the fieldset to "hidden" on node display so it only shows up on the submission form.

alexpott’s picture

Assigned: Unassigned » alexpott
Status: Active » Needs review
FileSize
1.14 KB

Just came across the same issue on a site I'm making. Here's a patch that adds the help that's set up on the node type edit form.

The patch implements a content_profile_help function which calls node_help with the correct path and node id.

bengaj’s picture

I tried your patch, but it does not seem to solve it. After user clicks the Create your Profile, gets taken to the content profile form, but the guidelines are still not visible. Any ideas Alex?

alexpott’s picture

This patch is for the edit profile edit form that's available when a user edits their account.

What is the url that the Create your Profile going to? If it's node/add/{contenttype} then this patch won't solve the missing guidelines. If you have added some guidelines to the node type edit page for the profile content type and they are missing this is a different issue. My best guess would be that your theme might not be printing $help.

crea’s picture

@alexpott: Proper patch should cover all cases: content profile edit form can have different paths

Btw, this is bug report. As user of this module I expect all node features to work with content profile.

crea’s picture

Category: bug » feature
Status: Needs review » Needs work

Slightly better function without regexps. It should work for all cases.

  function content_profile_help($path, $arg) {  
    if (arg(0) != 'user' || !is_numeric(arg(1))) {
      return;
    }
    
    if (arg(2) == 'profile' || arg(2) == 'edit') {
      $profile = arg(3);
      if (empty($profile)) {
        return;
      }
      foreach (content_profile_get_types() as $type => $info) {
        if ($profile == $type) {
          $node = content_profile_load($profile, $arg[1]);
          return node_help('node/%/edit', array(1 => $node->nid));    
        }
      }
    }
  }
crea’s picture

crea’s picture

Category: feature » bug
crea’s picture

Category: feature » bug
Status: Needs work » Needs review

I decided to use regexp to not make useless calls to content_profile_get_types(), same as in alexpott's patch. This version works both for existing and new nodes.

  function content_profile_help($path, $arg) {
    if (preg_match('/user\/\%\/(profile|edit)\/(.*)/', $path, $matches)) {
      foreach (content_profile_get_types('names') as $type => $typename) {
        if ($type == $matches[2]) {
          $node = content_profile_load($type, $arg[1]);
          if ($node) {
            return node_help('node/%/edit', array(1 => $node->nid));
          }
          else {
            return node_help('node/add/'. $type, array('node', 'add', $type));
          }
        }
      }
    }
  }
crea’s picture

FileSize
990 bytes

Patch implementing function above.

P.S. Happy New Year everyone !

Stoob’s picture

Good patch thank you

fago’s picture

Status: Needs review » Fixed

Thanks, I've committed the patch from #10.

Status: Fixed » Closed (fixed)

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