Notice: Undefined index: name in _token_token_tree_format_row() (line 108 of /var/www/mydomain.com/public_html/sites/all/modules/token/token.pages.inc).

If uninstall filefield path, no error message.

Install drupal 7, php 5.2.14, 5.1.49-MariaDB, nginx/0.8.54

CommentFileSizeAuthor
#13 1015460-by-borden_rhodes.patch455 bytesbfroehle
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klemmster’s picture

Same here.
Fresh install of drupal 7
Token
7.x-1.x-dev
and
FileField Paths
7.x-1.x-dev

The error occurs with stable token version as well.

Are there any logs that you could need?

bt82’s picture

Same.

Notice: Undefined index: name in token_asort_tokens() (line 343 of ...sites\all\modules\token\token.module).
Notice: Undefined index: name in _token_token_tree_format_row() (line 109 of ...sites\all\modules\token\token.pages.inc).

D7 - Token 7.x-1.x-dev - FileField Paths - 7.x-1.x-dev

nicolas.antoniazzi’s picture

same problem :

Notice: Undefined index: name in token_asort_tokens() (line 256 of /home/data/sites/drupal-7.0/sites/all/modules/token/token.module).
Notice: Undefined index: name in token_asort_tokens() (line 256 of /home/data/sites/drupal-7.0/sites/all/modules/token/token.module).
Notice: Undefined index: name in _token_token_tree_format_row() (line 109 of /home/data/sites/drupal-7.0/sites/all/modules/token/token.pages.inc).

Anonymous’s picture

Status: Active » Needs review

Ditto. From what I can tell, the error comes from the filefield_paths_token_info() function in filefield_paths.module, beginning at the 521st line. I don't know much about the token system, but it appears in that function that it's defining tokens for the original file name and extension.

There appears to be a typo on line 527 of filefield_paths.module. Where the array key should be 'name' it appears that it's been mistyped 'onlyname'. This patch should take care of it:

--- filefield_paths.module	2010-11-25 03:38:55.000000000 -0500
+++ filefield_paths.module.fixed	2011-01-09 04:18:54.903491178 -0500
@@ -524,7 +524,7 @@
     'description' => t("File name without extension."),
   );
   $file['ffp:onlyname:original'] = array(
-    'onlyname' => t("File name - original"),
+    'name' => t("File name - original"),
     'description' => t("File name without extension - original."),
   );
   $file['ffp:extension'] = array(

Oh, and you may need to clear your Drupal caches to get it working like I had to.

sw3b’s picture

I confirmed #4 working good for me !

r_honey’s picture

Priority: Normal » Major

I was having the same issue (fresh install of Drupal and Token)...
And the fix mentioned by Borden in #4 works. And I can confirm its a typo in the module, see this api page:
http://api.drupal.org/api/drupal/modules--system--system.api.php/functio...

czigor’s picture

I confirm that #4 works for me.

spacereactor’s picture

i try #4 but it doesn't stop the problem for me. still getting
Notice: Undefined index: name in _token_token_tree_format_row() (line 108 of /Applications/MAMP/htdocs/drupal7/sites/all/modules/token/token.pages.inc).

Using drupal 7.0, token 7.x-1.x-dev and FileField Paths 7.x-1.x-dev

spacereactor’s picture

update again, i using #4 and i need to change Home » Administration » Configuration » Media
Default download method to Private local files served by Drupal. in order to stop the error. Hope this help.

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community

Based on the sample size of 5 (and common sense about why this patch should work) I'm retagging with a plea that it be merged into the release so we can close this issue.

sw3b’s picture

I agree with you #10 !

yngens’s picture

subscribe

bfroehle’s picture

FileSize
455 bytes

Here's the patch in #4 as an attachment. All credit goes to Borden Rhodes.

Isaaci’s picture

Using #4 and #9
solved the issue

thank you

mattab’s picture

please include this in the dev version

mooselimb’s picture

#4 works :)
After patching, don't spend an hour scratching your head like me, simply clear your cache!

Jerome F’s picture

Thanks to the token checking improvement in http://drupal.org/node/1061714
I was able to get the following hint in the status report :

The following tokens or token types are missing required name and description information:

    * $info['tokens']['file']['ffp:onlyname:original']

Thanks to it I found this issue.
Then I applied the patch #13 and it works. I hope it will be commited in next dev.

fandb’s picture

Making the change from #4 worked also for me.
@Borden Rhodes thanks for tracking that down, was a sudden unpleasantness when the error popped up.

lpalgarvio’s picture

+1

johnv’s picture

I applied patch #4/#13 , and checked the settings as by spacereactor's #8 and #9, but still get the following errors:
Notice: Undefined index: name in _token_token_tree_format_row() line 107 of token.pages.inc

[Edit:] Perhaps this has the following reason:
- My content type has 3 filefields/imagefields. After visiting all Field settings (Only 1 needs Filefield paths), the error no longer appears.
Do you need to visit every FileField after installing Filefield Paths?

Julia_yl’s picture

I confirmed #4 working good for me ! thanks Borden Rhodes

GiorgosK’s picture

Patch in #13 (solution from #4) works as expected
errors/warnings are gone
please commit

Dave Reid’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
Jean Gionet’s picture

#4 did the trick for me as well! thxs!

HnLn’s picture

sub

jeffwidman’s picture

subscribe

jeffwidman’s picture

Fix works for me as well... Thx to the fellow who included the reminder to clear the cache.

Curious why this patch hasn't been committed?
It's been more than three months since Borden's comment included the fix...

luisgic’s picture

subscribe

wernercd’s picture

Hours turn into days... days turn into weeks...weeks into months... commit this already PLEASE!

Anonymous’s picture

Status: Closed (duplicate) » Reviewed & tested by the community

Reopening on grounds that the typo is still in the dev branch. The problem may very well be solved by #945122: Re-use the token tree UI and fix token integration by removing the token code altogether, but nevertheless this bug should stay open until there aren't any more people running into this problem (that is, either the typo's been removed or #945122: Re-use the token tree UI and fix token integration's been implemented).

(PS, thanks for all the props). I'd happily commit if someone would only tell me how.

bfroehle’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Borden: The patch no longer applies, and searching through the 7.x-1.x branch there aren't any instances of "onlyname". The 7.x-1.x download (http://drupal.org/node/372390) hasn't updated yet, but that should happen in the next 12 hours or so.

sachbearbeiter’s picture

maybe interesting:

token 7.x-1.0-beta1
pathauto 7.x-1.0-beta1

opening the admin pattern page of pathauto gives:
* Notice: Undefined index: name in token_asort_tokens() (line 352 of /xxx/token/token.module).
* Notice: Undefined index: name in token_asort_tokens() (line 352 of /xxx/token/token.module).
* Notice: Undefined index: name in token_asort_tokens() (line 352 of /xxx/token/token.module).
* Notice: Undefined index: name in token_asort_tokens() (line 352 of /xxx/token/token.module).
* Notice: Undefined index: name in token_asort_tokens() (line 352 of /xxx/token/token.module).
* Notice: Undefined index: name in token_asort_tokens() (line 352 of /xxx/token/token.module).
* Notice: Undefined index: name in token_asort_tokens() (line 352 of /xxx/token/token.module).
* Warning: uasort() [function.uasort]: Array was modified by the user comparison function in token_get_info() (line 320 of /xxx/token/token.module).

Anonymous’s picture

My mistake. The update hasn't gone to the module download yet. I was going based on the downloads and not the branch's source.

jeffwidman’s picture

So when will this get a development release on the module download area??

johnv’s picture

Jeff, see this issue: #1169682: Update D7 dev version

Patricia_W’s picture

I notice that this issue is with FileField Paths so it may not apply to my problem but I am getting this error after installing the most current version of token (7.x-1.0-beta5):

The following tokens or token types are missing required name and description information:

$info['tokens']['term']['url']
The following token types are not defined but have tokens:

$info['types']['term']

brunorios1’s picture

Same of #36 here...

bfroehle’s picture

Patricia, brunorios1: Please open a new issue if you are having a different problem. In general nobody reads issues which are closed.

Patricia_W’s picture

I realized this and added my problem to another active thread.