Hi guys,

You generate a pattern depending on the language. However, when we do not have any language feature installed (other than the base locale) then, in some circumstances, the system generates an E_NOTICE on node creation.

See attached patch.

Thank you.
Alexis

Comments

Status: Needs review » Needs work

The last submitted patch, pathauto-1.x-language_notice-6.x.patch, failed testing.

dave reid’s picture

Status: Needs work » Postponed (maintainer needs more info)

I can't duplicate any E_NOTICE with the current code. In what case is $form['language'] defined but neither $form['language']['#value'] nor $form['language']['#default_value']? Is some other module altering this form element before pathauto?

AlexisWilke’s picture

Status: Postponed (maintainer needs more info) » Active

It specifically happens when I use drupal_execute(). I'm not too sure why drupal_execute() would not work the same way as the other calls. The same code should be hit...

node_form() executes this loop that adds language every time and with a #value (no default...)

  foreach (array('nid', 'vid', 'uid', 'created', 'type', 'language') as $key) {
    $form[$key] = array(
      '#type' => 'value',
      '#value' => isset($node->$key) ? $node->$key : NULL,
    );
  }

Thus I do not have any good explanation why that would be happening! (other than, it must not be going through that function at all when just calling drupal_execute().)

Thank you.
Alexis Wilke

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Can you post the code you're using? Still marking as needs info since we don't really know what the problem is or how to fix it.

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

Marking as fixed due to lack of feedback.

AlexisWilke’s picture

No problem, I think that's my specialized use of the module that generates the problem. Thank you. Alexis

dave reid’s picture

Cool. Well thanks for the initial bug report Alexis. Let us know if you encounter anything else.

Status: Fixed » Closed (fixed)

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