I am willing to presume that this has something to do with some other module I have installed, enabled, disabled or otherwise encountered (I say this because otherwise I imagine many more users would have encountered this!)

I have enabled the core 'Profile' and 'Taxonomy' modules and created a vocabulary and a few fields in the Profile section of User Management, then I have enabled Profile Taxonomy, but I don't get the new form field either when creating a new 'list selection' field or editing an already created 'selection' field.

I had previously installed the Content Profile module, but changed my mind about the way I wanted to do things and that module is now disabled (although the files are still on the server)

Any help pointing me in the right direction very much appreciated :)

Comments

ITMonkey’s picture

In case anyone else does get this error, it's possible to get around the problem by simply creating a selection list field and then manually adding the field name and vocabulary id into the profile_taxonomy table kindly provided by the module.

The rest of the module seems to be working correctly, users can happily select from the assigned taxonomy category list when creating accounts and it stores the values correctly, I just can't see the settings in admin/users/profile when I add or edit.

gnindl’s picture

Version: 6.x-1.0-rc1 » 6.x-1.0-rc2
Assigned: Unassigned » gnindl
Status: Active » Fixed

It seems like the profile_taxonomy_form_profile_field_form_alter(&$form, $form_state) is not called. Disabling and enabling the 1.0-rc2 release of the module worked out for me.

Status: Fixed » Closed (fixed)

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

gregoiresan’s picture

Version: 6.x-1.0-rc2 » 6.x-1.0-rc3
Status: Closed (fixed) » Active

The new form field "Selection options from vocabulary (advanced)" does not appear
I've tried : "Disabling and enabling the 1.0-rc3 release of the module "
Still, it doesn't work...

Any Idea ?

halmsx’s picture

having same problem. anyone?

giggler’s picture

Version: 6.x-1.0-rc3 » 6.x-1.x-dev

using 6.x-1.x-dev and I don't see "Selection options from vocabulary (advanced)" either.

gregoiresan’s picture

I guess there is no solution and the module isn't working properly. I'm using User Terms which does the job.

gnindl’s picture

Status: Active » Fixed

Current dev uses hook_form_alter instead of hook_form_FORM_ID_alter. The issue http://drupal.org/node/300481 deals with the problem that the first hook may be overriden by the second one, e. g. when using the module content profile

Status: Fixed » Closed (fixed)

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

zet’s picture

Version: 6.x-1.x-dev » 6.x-1.2
Status: Closed (fixed) » Active

Same problem here, after >1 year, with latest "stable" versions of both drupal and profile taxonomy module. Just the core User Profile. No Content Profile module enabled/disabled.

2 weeks with no activity does not mean is fixed.
I don't get the new form field either when creating a new 'list selection' field or editing an already created 'selection' field.

I think I'll try the User Terms module and switch to it if is proving to be better, as gregoiresan suggested.

zet’s picture

So, after trying User Terms, I should say for the others that might have this issue, the problem with that module is that it sets a new fieldset above the others, that I don't want it, named "User Terms", that limits his purpose for some use cases.

ITMonkey, your aproach from #1 comment does not work for me. Maybe beacuse I use Profile checkboxes module(that stores serialized arrays), and I set the select list to Multiple Selections?

gnindl, have you tried weighting your module ?

zet’s picture

Ok, so in my case, the problem seems to be dissapeared and the "Advanced selection options referencing taxonomy terms" appeared back after I disabled the Profile pictures module( that was enabled after Profile Taxonomy)

I did this after trying with setting Profile taxonomy's weight in the system table as a higher value with no result.

Profile taxonomy default weight was 0, same as Profile pictures.

It will be a very good thing for the moment to specify on the module description from the project page that it conflicts with Profile Pictures module.(don't know who's fault)

Just for the reference, this is Profile pictures implementation of hook_form_alter

/**
 * Implementation of hook_form_alter().
 */
function profile_pictures_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'profile_admin_overview') {
    $addnewfields = $form['addnewfields']['#value'];

    // Parsing addnewfields item
    $regex = '/^(<h2>[^<>]*<\/h2><ul>)(.*)(<\/ul>)$/';
    preg_match($regex, $addnewfields, $match);
    $head = $match[1];
    $addnewfields = $match[2];
    $tail = $match[3];

    // Adding new field type
    $addnewfields .=
      '<li>' . l(t('picture'), 'admin/user/profile/add/picture') . '</li>';

    $form['addnewfields']['#value'] = $head . $addnewfields . $tail;
  }
  elseif (($form_id == 'user_profile_form') || ($form_id == 'user_register') || ($form_id == 'profile_form_profile')) {
    $register = ($form_id == 'user_register');
    $acc = &$form['#parameters'][2];
    $category = $form['#parameters'][3];
    $have_picture = FALSE;

    // Adding our fields' edit boxes
    $res = _profile_get_fields($category, $register);
    while ($field = db_fetch_object($res)) {
      $category = $field->category;
      if (!isset($form[$category])) {
        continue;
      }

      $form[$category][$field->name]['#weight'] = $field->weight;
      if ($field->type != 'picture') {
        continue;
      }
      $have_picture = TRUE;
      $opts = unserialize($field->options);

      $curf = &$form[$category][$field->name];
      $required = $field->required ? '<span class="form-required" title="'. t('This field is required.') .'">*</span>' : '';
      $curf = array(
        '#type'   => 'fieldset',
        '#title'  => t($field->title) . $required,
        '#weight' => $field->weight,
        $field->name . '_upload' => array(
          '#type'   => 'file',
          '#title'  => t('Upload'),
          '#size'   => 40,
          '#description' => $field->explanation ? t($field->explanation) : '',
          '#weight' => 2,
        ),
      );
      // If there is current image, we display it
      if ($acc->{$field->name}) {
        $current = explode('?', $acc->{$field->name});
        $current = $current[0];
        $curf['current'] = array(
          '#value'  => theme('profile_picture', $acc->{$field->name}, $field->title, '', $opts['imagecache_preset']),
          '#weight' => 0,
        );
        $curf[$field->name . '_current'] = array(
          '#type'  => 'value',
          '#value' => $current,
        );
        if (!$field->required) {
          $curf[$field->name . '_delete'] = array(
            '#type'  => 'checkbox',
            '#title' => t('Delete'),
          );
        }
      }
    }
    if ($have_picture) {
      // We need to validate all our fields, so...
      $form['#validate'][] = 'profile_picture_validate';
      // See #886510
      $form['#attributes']['enctype'] = 'multipart/form-data'; // See #886510: Image not uploaded in signup
    }
  }
}

and this is the implementation of hook_form_alter in Profile Taxonomy module

/**
 * Implementation of hook_form_alter() adapting user related forms.
 * @param $form
 *   array of form content
 * @param $form_state
 *   array of form values
 * @param $form_id
 *   id of the form
 */
function profile_taxonomy_form_alter(&$form, &$form_state, $form_id) {
  
  switch ($form_id) {
  	// Alter the profile field's administration form. Vocabularies are referenced here
    // that supply the term names as options.
    case 'profile_field_form':
      if (_profile_taxonomy_get_field_type($form) == 'selection') { // determine field type
      	profile_taxonomy_field_settings($form);
      }
      break;
    // Alter the widget which is exposed to user, 
    // e. g. user pages or registration form
    case 'user_profile_form':
    case 'user_register':
      profile_taxonomy_field_widget($form);
      break;
  }
}
gnindl’s picture

Status: Active » Closed (duplicate)

@zet: The bug was initially caused by a different problem. Now it's an incompatibility with profile pictures module. I advise therefore to continue in this thread. Thanks a lot: http://drupal.org/node/1245262#comment-4948094

chinita7’s picture

I had the same problem but updated it to 6.x-1.3 and it's already fixed.Thanks.