When I try to create my very first client I get the following error:

Notice: Undefined index: alias em path_form_element_validate() (line 153 of /var/www/modules/path/path.module).
Recoverable fatal error: Argument 2 passed to drupal_array_set_nested_value() must be an array, null given, called in /var/www/includes/form.inc on line 2418 and defined em drupal_array_set_nested_value() (line 6280 of /var/www/includes/common.inc).

The path module is working fine as I can assign path names to other content types.

All hints are welcome!

Comments

bdragon’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this.
Can you clear your caches and try again?

If you're still having trouble after that, can you post a more detailed description of what you're doing?

chlodwig’s picture

Assigned: Unassigned » chlodwig

I have the same problem even with beta2. After clearing all the caches nothing. I tested the absolute path and the relativ path. But then I find the problem. It ist pathauto. If you deactivate this module the first client can be installed. But I don't testet it, when pathauto is activated again.

tomsherlock’s picture

Just wanted confirm that I also encountered the same issue with beta 2. Also cleared all cache.
I was able to create the first client only after deactivating pathauto.

tomsherlock’s picture

I have reactivated pathauto and attempted to add a new client resulting in the same error.
BTW, I got two errors originally and this time as well. They are :

Notice: Undefined index: alias in path_form_element_validate() (line 153 of /Applications/MAMP/htdocs/example.org/modules/path/path.module).

Recoverable fatal error: Argument 2 passed to drupal_array_set_nested_value() must be an array, null given, called in /Applications/MAMP/htdocs/example.org/includes/form.inc on line 2436 and defined in drupal_array_set_nested_value() (line 6296 of /Applications/MAMP/htdocs/example.org/includes/common.inc).

It would be great if Drupal logged the stack trace. I see no obvious connection between the above errors and creating a client in the the Support Ticketing System.

It appears that Support Ticketing System is attempting to create a path in the same "space" as pathauto. Perhaps even attempting to use one of pathauto's functions or utilities without passing in the correct parameters.

cesar.brod@gmail.com’s picture

Well, deactivating pathauto is not a solution for me... I wonder if there is any further testing I can perform in order to help solving this problem...

matrobin’s picture

Pathauto's function pathauto_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode) attaches its automatic alias form elements to the support client's path field:

    ...
    // Taxonomy terms do not have an actual fieldset for path settings.
    // Merge in the defaults.
    $form['path'] += array(
      '#type' => 'fieldset',
      '#title' => t('URL path settings'),
      '#collapsible' => TRUE,
      '#collapsed' => empty($form['path']['alias']),
      '#group' => 'additional_settings',
      '#attributes' => array(
        'class' => array('path-form'),
      ),
      '#access' => user_access('create url aliases') || user_access('administer url aliases'),
      '#weight' => 30,
      '#tree' => TRUE,
      '#element_validate' => array('path_form_element_validate'),
    );
    ...

Trying to submit a support client the attached validator path_form_element_validate throws the error messages.

There might be a naming or type conflict ('#type' => 'fieldset' in path,module path_form_node_form_alter vs '#type' => 'textfield' in support.admin.inc support_client_form) between the core's node field "path" and the support client "path"...?! $form['path'] += array(... in pathauto_field_attach_form does not match the path field definition of the support client entity.

By the way: - I'm quit new to the Support module - What's the meaning of that support client path? Where is this path value used?

jmaties’s picture

same error

bdragon’s picture

Status: Postponed (maintainer needs more info) » Fixed

@matrobin: Thanks for the pointer in the right direction, that's exactly the info I needed.

Pathauto was assuming that $form['path'] came from path.module. Since it's relatively easy to work around, I did so by moving the element to $form['client_path'] so pathauto won't see it anymore.

This should be fixed now.

http://drupalcode.org/project/support.git/commit/983e0cee01ae4001f0c8f08...

Status: Fixed » Closed (fixed)

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