Closed (fixed)
Project:
Token
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
17 Aug 2011 at 21:21 UTC
Updated:
14 Sep 2011 at 13:11 UTC
Jump to comment: Most recent file
After upgrading to 1.0-beta4 I get the following error:
Notice: Undefined index: comment_node_panel in _token_field_info() (line 1209 of /modules/token/token.tokens.inc).
| Comment | File | Size | Author |
|---|---|---|---|
| #29 | 1252566_29.patch | 859 bytes | giorgosk |
| #11 | 1252566-token-bundle-undefined-wtf.patch | 848 bytes | dave reid |
Comments
Comment #1
dave reidThis would imply that $entity_info[$entity]['bundles'][$bundle]['label'] is not defined when $bundle = 'comment_node_panel'. What module are you using that creates bundles like that? Panels?
Comment #2
hswong3i commentedConfirm also facing this error message. Should I post the list of all enabled modules as refer?
Comment #3
cateye commentedI am not using Panels.
I am using:
Node Reference
Profile2
Token
Pathauto
Rules
User Points
Fields
I will try to reproduce it on a clean install and enabeling each module etc.
Comment #4
sun-fire commentedI have the same trouble.
There are lot of notices in site's log, like this:
Notice: Undefined index: page in _token_field_info() (line 1209 of /sites/all/modules/token/token.tokens.inc).
Comment #5
Webestdesigns commentedI too am getting the following errors after updating;
Notice: Undefined index: comment_node_himuesgallery in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: comment_node_media_gallery in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: himuesgallery in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: default in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Comment #6
dave reidMerging in #1253108: Undefined index: shipping and #1253156: Notices after updating
Comment #7
dave reidThis is so frustrating - I never encountered this and all of a sudden apparently fields still have data that says they're attached to non-existant entity bundles. I'll add some protection to prevent this.
Comment #8
dave reidIf someone can help reproduce starting with a clean install, and slowly working through until this can be reproduced that would be great. I would like to know where it is going wrong.
Comment #9
adamwhite commentedI'm getting the same problem. I'm wondering if Quiz has something to do with it as many of my errors reference it:
Notice: Undefined index: comment_node_quiz in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: comment_node_multichoice in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: comment_node_quiz_directions in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: comment_node_scale in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: comment_node_matching in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: quiz in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: multichoice in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: scale in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Notice: Undefined index: matching in _token_field_info() (line 1209 of /---/sites/all/modules/token/token.tokens.inc).
Can I provide any more info to help out?
Comment #10
justmagicmaria commentedI got this when I installed the FAQ module, created a FAQ, then disabled the FAQ module. If I uninstall the module, it goes away.
Comment #11
dave reidPlease test the following patch as a fix in the meantime until I can figure out what is causing this.
Comment #12
design.er commentedpath from #11 works like a charm for me. thanks so much!
Comment #13
bt82 commented...same here. patch worked just fine using d7.7. thanks again
Comment #14
cateye commentedI can not reproduce this issue on a clean install yet.
Comment #15
dave reidCommitted #11 to 7.x-1.x as a temporary measure. Still want to debug this and figure out *why* its not working.
http://drupalcode.org/project/token.git/commit/44f9331
Comment #16
cateye commentedEntity tokens is causing the problem. If I turn the module off, the notice is gone.
Comment #17
dave reidCan anyone else confirm that disabling Entity API prevents this problem? Make sure *not* to update to 7.x-1.x-dev to try this and be sure to clear your caches to get it to generate.
Comment #18
cateye commentedTo be precise: Entity API is not causing the problem. Entity tokens (7.x-1.0-beta10) is causing the problem. So please confirm that turning on/off "Entity tokens" is effecting the error notices.
Comment #19
michellezeedru commentedHi - I can confirm that turning off Entity tokens makes the errors go away, turning it on makes them come back.
Of course, without Entity tokens my custom breadcrumbs don't work right ...
Let me know if there's anything else I can do to help debug!
Comment #20
paulgemini commentedI'm with others in suspecting that this is entity api. Not coincidentally, there have been some recent changes to entity api dev. Here are they are:
http://drupal.org/node/626176/commits
None of those recent commits stick out to me in dealing with entity tokens, though many of them deal with entity/rules integration...
The Rules module just underwent a whole pile of changes:
http://drupal.org/node/190124/commits
Comment #21
js commentedYes disabling entity_tokens worked for me as well.
All my errors messages related to taxonomy vocabularies. The above patch did not help.
AND, thank you for Token.
Comment #22
robert.laszlo commentedI am getting this error as well. Disabling the Entity Token module seemed to make the errors go away on most pages, but not completely.
I also tried reverting back to beta 3, but that didn't seem to work either.
Any suggestions?
Comment #23
dave reidMoving this to the entity issue queue.
We are encountering problems with the following code in token module when entity_tokens is enabled:
Comment #24
dfishjr commentedSubscribe
Comment #25
chemicalroman commentedSubscribe
Comment #26
rodrigoaguilerasub
Comment #27
guywithglasses commentedsubscribe
The patch at #11 works for me. THANK YOU.
FWIW: I did a specific action on my site that caused the problem. I enabled the core "blog" module, then changed my mind and disabled it. Then my site had the following error messages on the pages:
I'm running Drupal 7.7 with current Token release. I didn't check every page of my site for the error message, but it was on every page I looked at which FWIW were all Panels node template pages.
Comment #28
giorgoskHave same problem
tried to install the entity API latest dev's thinking that it might solve the problem
still warning messages appear ...
Comment #29
giorgoskmodification on temporary #11 patch
if you get more warnings after having both
latest dev release token and latest entity api
together with commerce
apply on latest token dev release
Comment #30
gratefulsk commentedDisabling entity tokens cleared all my errors. I was getting about 10 of them on every page.
Comment #31
ryan258 commentedDoes anybody know if this has any effect on Ubercart sites not having a properly working entity token module?
Comment #32
spacereactor commentedSubscribe
Comment #33
BeaPower commentedI am also getting these errors after disabling the chatroom module:
Notice: Undefined index: comment_node_chatroom in _token_field_info() (line 1209 of /var/www/vhosts/eex.com/httpdocs/34/modules/token/token.tokens.inc).
Notice: Undefined index: comment_node_chat in _token_field_info() (line 1209 of /var/www/vhosts/eex.com/httpdocs/34/modules/token/token.tokens.inc).
Comment #34
Starminder commented+1
Comment #35
dave reidOk I'm able to duplicate this by enabling and then disabling core Forum module without having Entity tokens enabled, so I'm moving this issue back. It appears that I didn't account for field_info_field() having information about fields attached to disabled bundles. The temporary patch is good - I'm going to round out some comments.
Also merging in #1256444: Multiple Warnings: Warning: array_count_values() [function.array-count-values]: The argument should be an array in _token_field_ which happens when a field is only attached to all disabled bundles.
Comment #36
dave reidOk everyone I've added http://drupalcode.org/project/token.git/commit/17f41be which should resolve this for good. This is the type of issue I hoped to be able to prevent by having tests written but I didn't have to time to be able to push out the basic token support. I will likely roll another beta release at the end of day.
Comment #37
dave reidComment #38
paulgemini commentedMany thanks, Dave!
Comment #39
damienmckennaMarked #1255902: Notice: Undefined index: webform in _token_field_info as a duplicate.
Comment #40
timwee commentedPath /admin/reports/event/163721
Reference /admin/reports/dblog
Message Notice: Undefined index: label în _token_field_info() (linia 1218 din \sites\all\modules\token\token.tokens.inc).
This error appears only with entity token enabled.
project = "token"
version = "7.x-1.x-dev"
datestamp = "1314061405"
project = "entity"
version = "7.x-1.x-dev"
datestamp = "1313713320"
Comment #41
gabriel.achille commentedMany thanks Dave.
Comment #42
Denon commentedI use the latest dev version of token datestamp = "1314753094"
I have several lines with this error in my website log, each refresh brings more error lines.
Notice: Undefined index: label in _token_field_info() (line 1225 ..token\token.tokens.inc).
Line 1225 is:
$info[$key]['bundles'][$token_type][$bundle] = $entity_info[$entity]['bundles'][$bundle]['label'];
This error appears only when entity token ( latest dev) is enabled.
Any solution will be greatly appreciated!
Thank you
Comment #43
damienmckennaI found the cause of my problem - I had a field exported via Features which was assigned to two content types, but one of them had been deleted, so as it was iterating through the field's $bundles array it came across a reference to the now defunct content type thus logged an error.