notice: Undefined index: node:vocab:1:alias in /Library/WebServer/Documents/drupal6/sites/all/modules/taxonomy_token/taxonomy_token.module on line 256.
The module works everywhere it's supposed to - I'm finding it an excellent addition to auto_nodetitle.module
However, I get this notice when hitting the edit page of a node. Everything works, and I'm only seeing the notices because I run with PHP-strict warnings on. I develop with PHP-strict because that's the Drupal best-practice.
Looks like it's a simple case of accessing data that isn't always there yet.
...
.. Although no, looking at it it seems that 'strict' has indeed shown us a logic error or typo there. Good, that is what it is for, finding real bugs!
$term = taxonomy_get_term($result['tid']);
$values[$label .':termalias'] = drupal_get_path_alias(taxonomy_term_path($term));
if (!strncasecmp($values[$label .':alias'], 'taxonomy', 8)) {
$values[$label .':termalias'] = check_plain($result['name']);
}
the call to $values[$label .':alias'] is invalid there - that key can never exist in the current code.
Was it a typo for $label .':termalias' ?
There are no comments at all in the code, so there's no way to guess what was intended to happen there, otherwise I'd be able to assist you with a patch.
.dan.
Comments
Comment #1
rsevero commentedThanks for the report and sorry for the delay.
The ':alias' was a typo but after all I figured out that the whole test in lines 256/258 was not necessary. I removed it completely.
Fixed with http://drupal.org/cvs?commit=442106.
Comment #2
dman commentedGroovy!