Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#13 | 1015460-by-borden_rhodes.patch | 455 bytes | bfroehle |
Comments
Comment #1
klemmster CreditAttribution: klemmster commentedSame 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?
Comment #2
bt82 CreditAttribution: bt82 commentedSame.
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
Comment #3
nicolas.antoniazzi CreditAttribution: nicolas.antoniazzi commentedsame 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).
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedDitto. 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:
Oh, and you may need to clear your Drupal caches to get it working like I had to.
Comment #5
sw3b CreditAttribution: sw3b commentedI confirmed #4 working good for me !
Comment #6
r_honey CreditAttribution: r_honey commentedI 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...
Comment #7
czigor CreditAttribution: czigor commentedI confirm that #4 works for me.
Comment #8
spacereactor CreditAttribution: spacereactor commentedi 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
Comment #9
spacereactor CreditAttribution: spacereactor commentedupdate 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.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedBased 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.
Comment #11
sw3b CreditAttribution: sw3b commentedI agree with you #10 !
Comment #12
yngens CreditAttribution: yngens commentedsubscribe
Comment #13
bfroehle CreditAttribution: bfroehle commentedHere's the patch in #4 as an attachment. All credit goes to Borden Rhodes.
Comment #14
Isaaci CreditAttribution: Isaaci commentedUsing #4 and #9
solved the issue
thank you
Comment #15
mattab CreditAttribution: mattab commentedplease include this in the dev version
Comment #16
mooselimb CreditAttribution: mooselimb commented#4 works :)
After patching, don't spend an hour scratching your head like me, simply clear your cache!
Comment #17
Jerome F CreditAttribution: Jerome F commentedThanks to the token checking improvement in http://drupal.org/node/1061714
I was able to get the following hint in the status report :
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.
Comment #18
fandb CreditAttribution: fandb commentedMaking the change from #4 worked also for me.
@Borden Rhodes thanks for tracking that down, was a sudden unpleasantness when the error popped up.
Comment #19
lpalgarvio CreditAttribution: lpalgarvio commented+1
Comment #20
johnvI 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?
Comment #21
Julia_yl CreditAttribution: Julia_yl commentedI confirmed #4 working good for me ! thanks Borden Rhodes
Comment #22
GiorgosKPatch in #13 (solution from #4) works as expected
errors/warnings are gone
please commit
Comment #23
Dave ReidThis is a duplicate of #945122: Re-use the token tree UI and fix token integration
Comment #24
Jean Gionet CreditAttribution: Jean Gionet commented#4 did the trick for me as well! thxs!
Comment #25
HnLn CreditAttribution: HnLn commentedsub
Comment #26
jeffwidman CreditAttribution: jeffwidman commentedsubscribe
Comment #27
jeffwidman CreditAttribution: jeffwidman commentedFix 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...
Comment #28
luisgic CreditAttribution: luisgic commentedsubscribe
Comment #29
wernercd CreditAttribution: wernercd commentedHours turn into days... days turn into weeks...weeks into months... commit this already PLEASE!
Comment #30
Anonymous (not verified) CreditAttribution: Anonymous commentedReopening 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.
Comment #31
bfroehle CreditAttribution: bfroehle commentedBorden: 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.
Comment #32
sachbearbeiter CreditAttribution: sachbearbeiter commentedmaybe 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).
Comment #33
Anonymous (not verified) CreditAttribution: Anonymous commentedMy mistake. The update hasn't gone to the module download yet. I was going based on the downloads and not the branch's source.
Comment #34
jeffwidman CreditAttribution: jeffwidman commentedSo when will this get a development release on the module download area??
Comment #35
johnvJeff, see this issue: #1169682: Update D7 dev version
Comment #36
Patricia_W CreditAttribution: Patricia_W commentedI 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):
Comment #37
brunorios1 CreditAttribution: brunorios1 commentedSame of #36 here...
Comment #38
bfroehle CreditAttribution: bfroehle commentedPatricia, brunorios1: Please open a new issue if you are having a different problem. In general nobody reads issues which are closed.
Comment #39
Patricia_W CreditAttribution: Patricia_W commentedI realized this and added my problem to another active thread.