Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Plugins system
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 May 2011 at 05:35 UTC
Updated:
15 Jun 2011 at 18:02 UTC
Notice: Undefined index: name in ctools_token_content_type_content_types() (line 45 of XXX/html/sites/all/modules/ctools/plugins/content_types/token/token.inc).
Just updated to new version of Token, new dev versions of Panels and CTools.
Also report show immediately prior another notice:
Notice: Undefined variable: form in page_manager_page_subtask_argument_ajax() (line 1059 of xxx/html/sites/all/modules/ctools/page_manager/plugins/tasks/page.admin.inc)
Comments
Comment #1
davidsanger commentedWhen I return it now posts as an ERROR:
ERROR
Notice: Undefined index: name in ctools_token_content_type_content_types() (line 45 of /XXX/sites/all/modules/ctools/plugins/content_types/token/token.inc).
and the Panels module is unusable
Comment #2
davidsanger commentedComment #3
davidsanger commentedalso added as http://drupal.org/node/1168820 ( I know this is redundant, so could someone please advise where the issue belongs. thx)
Comment #4
zentasapprentice commentedI had to clear the cache after updating to the latest dev.
If you're having trouble getting there, try yoursite/admin/config/development/performance
Comment #5
davidsanger commentedIt's not a cache problem. They have been cleared many times.,
I am now completely stuck since it is impossible to add or edit any Panel content or even to create a new Panel
At this point I have no idea what to do about it.
ERROR
Notice: Undefined index: name in ctools_token_content_type_content_types() (line 45 of /xxx/sites/all/modules/ctools/plugins/content_types/token/token.inc).
---
btw current module versions are
Chaos tool suite 7.x-1.x-dev (2011-May-16)
Panels 7.x-3.x-dev (2011-May-10)
Token 7.x-1.x-dev (2011-May-27)
Comment #6
merlinofchaos commentedI checked in a fix where we check to make sure the name is not empty. I don't know how token actually is providing nameless tokens, but whatever.
Comment #7
davidsanger commentedthanks - so will this be in an upcoming dev release of ctools?
and does your comment mean there is possibly a bug in the tokens module?
Comment #8
merlinofchaos commentedPossibly! It's also possible I just don't know exactly how tokens is meant to work. It may be worth digging into a little more?
And yes, the next -dev should roll in about 2 hours.
Comment #9
davidsanger commentedany suggestions where to look or how?
I thought it might be a corrupt panel definition so uninstalled and reinstalled. same problem.
Comment #10
merlinofchaos commentedI don't know enough about token.module to offer suggestions, unfortunately.
The best I could offer would be to dump the token info array that gets returned just before the bit that crashes and see if you can identify the empty token. This takes knowing enough PHP to know how to write debug code, though, and you haven't said whether or not you have enough development knowledge to do that.
Comment #11
davidsanger commentedI know basic php and did make one try at that (using echo) but it didn't work. I can give it another go, though, if the dev fix doesn't allow me to proceed.
Found this issue too in the Tokens project, which discusses the same and similar errors in a slightly different context
http://drupal.org/node/991636
Comment #12
merlinofchaos commenteddevel.module and dsm() are fantastic debugging tools. Highly recommended.
Comment #13
davidsanger commentedOK Earl.I added a little PHP print statement showing:
ENTITY: $entity_type
NAME: $token['name']
DESCRIPTION: $token['description']
here's the last few results. Looks like entity_type "comment" is the problem.
not sure what to do next
[ps going to look at DIsqus comment module to see if that is the problem]
.....
ENTITY: menu
NAME: Name
DESCRIPTION: The name of the menu.
NAME: Machine-readable name
DESCRIPTION: The unique machine-readable name of the menu.
NAME: Description
DESCRIPTION: The optional description of the menu.
NAME: Menu link count
DESCRIPTION: The number of menu links belonging to the menu.
NAME: Edit URL
DESCRIPTION: The URL of the menu's edit page.
ENTITY: media
NAME: Description
DESCRIPTION: Field media_description
NAME: Title
DESCRIPTION: Field media_title
NAME: License settings for this audio
DESCRIPTION: Field field_license
NAME: credit-line
DESCRIPTION: Field field_credit
NAME: caption
DESCRIPTION: Field field_caption
NAME: Description
DESCRIPTION: Field field_description
ENTITY: comment
NAME:
DESCRIPTION:
Comment #14
merlinofchaos commentedNot sure where to take this from here, but that definitely is the problem. With no information, it's a bit tough to trace back to its source, but clearly a module is providing a bad token for comment. Dave's comment on that issue you linked suggest it's some module misbehaving with token api, so maybe the next trick is to grep for modules implementing the token api hook and maybe enable/disable and test and see if you can pin down which module makes this happen.
Comment #15
davidsanger commentedDisabling the Disqus comment module seems to have fixed it. I'll post an issue there.