Hi,

I'm getting these notices with 1.0-beta1. Should I use the dev version?

    * Notice: Undefined index: date-field in _token_build_tree() (line 737 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).
    * Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 737 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).
    * Notice: Undefined index: datestamp-field in _token_build_tree() (line 737 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).
    * Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 737 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).
    * Notice: Undefined index: datetime-field in _token_build_tree() (line 737 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).
    * Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 737 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).

I'm using Date/Calendar 2.x-dev and these modules:

quickstart@qs09:~/websites/pro.p1$ drush pm-list --status=enabled --no-core
 Package           Name                                               Type    Version       
 Administration    Administration menu (admin_menu)                   Module  7.x-3.x-dev   
 Chaos tool suite  Chaos tools (ctools)                               Module                
 Commerce          Cart (commerce_cart)                               Module                
 Commerce          Checkout (commerce_checkout)                       Module                
 Commerce          Commerce (commerce)                                Module                
 Commerce          Commerce UI (commerce_ui)                          Module                
 Commerce          Customer (commerce_customer)                       Module                
 Commerce          Customer UI (commerce_customer_ui)                 Module                
 Commerce          Line Item (commerce_line_item)                     Module                
 Commerce          Line Item UI (commerce_line_item_ui)               Module                
 Commerce          Order (commerce_order)                             Module                
 Commerce          Order UI (commerce_order_ui)                       Module                
 Commerce          Payment (commerce_payment)                         Module                
 Commerce          Payment Method Example (commerce_payment_example)  Module                
 Commerce          Payment UI (commerce_payment_ui)                   Module                
 Commerce          Price (commerce_price)                             Module                
 Commerce          Product (commerce_product)                         Module                
 Commerce          Product Pricing (commerce_product_pricing)         Module                
 Commerce          Product Pricing UI (commerce_product_pricing_ui)   Module                
 Commerce          Product Reference (commerce_product_reference)     Module                
 Commerce          Product UI (commerce_product_ui)                   Module                
 Commerce          Tax (commerce_tax)                                 Module                
 Commerce          Tax UI (commerce_tax_ui)                           Module                
 Date/Time         Calendar (calendar)                                Module  7.x-2.x-dev   
 Date/Time         Date (date)                                        Module  7.x-2.x-dev   
 Date/Time         Date API (date_api)                                Module  7.x-2.x-dev   
 Date/Time         Date Views (date_views)                            Module  7.x-2.x-dev   
 Development       Devel (devel)                                      Module  7.x-1.0       
 Features          Appointments Feature (appointments_feature)        Module  7.x-1.0       
 Features          Business Site Feature (business_site_feature)      Module  7.x-1.0       
 Features          Features (features)                                Module  7.x-1.x-dev   
 Features          Portrait Page (portraitpages_feature)              Module  7.x-1.0       
 Features          Profiles Feature (profiles_feature)                Module  7.x-1.0       
 Features          Services Feature (services_feature)                Module  7.x-1.0       
 Fields            Address Field (addressfield)                       Module                
 Fields            Email (email)                                      Module  7.x-1.0-beta1 
 Fields            Node Reference (node_reference)                    Module  7.x-2.x-dev   
 Fields            References (references)                            Module  7.x-2.x-dev   
 Fields            User Reference (user_reference)                    Module  7.x-2.x-dev   
 Other             Advanced help (advanced_help)                      Module  7.x-1.0-beta1 
 Other             Backup and Migrate (backup_migrate)                Module  7.x-2.1       
 Other             Entity API (entity)                                Module                
 Other             Entity tokens (entity_token)                       Module                
 Other             Pathauto (pathauto)                                Module  7.x-1.0-beta1 
 Other             Profile pages (profile2_page)                      Module  7.x-1.0-beta2 
 Other             Profile2 (profile2)                                Module  7.x-1.0-beta2 
 Other             Token (token)                                      Module  7.x-1.0-beta1 
 Powma             Admin (admin)                                      Module                
 Powma             Appointments (appointments)                        Module                
 Powma             Bootstrap (bootstrap)                              Module                
 Powma             Gift Certificates (giftcertificates)               Module                
 Powma             Powma Social (social)                              Module                
 Rules             Rules (rules)                                      Module                
 Rules             Rules UI (rules_admin)                             Module                
 Views             Views (views)                                      Module                
 Views             Views UI (views_ui)                                Module                
 Other             powmatwo (powmatwo)                                Theme        

Thanks :-)

Mike

Date/Calend

Comments

MichaelCole’s picture

This happens in 1.x-dev as well...

WD php: Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 736 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).                           [warning]
WD php: Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 736 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).                           [warning]
WD php: Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 736 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).                           [warning]
powma was enabled successfully.                                                                                                                                                              [ok]
Invalid argument supplied for foreach() in _token_build_tree() (line 736 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).                                            [warning]
Invalid argument supplied for foreach() in _token_build_tree() (line 736 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).                                            [warning]
Invalid argument supplied for foreach() in _token_build_tree() (line 736 of /home/quickstart/scm/git/powma.2/modules/contrib/token/token.module).                                            [warning]
The block Powma: Title was assigned to the invalid region header_first and has been disabled.                                                                                                [warning]
The block Powma: Contact was assigned to the invalid region footer_first and has been disabled.                                                                                              [warning]
The block Powma: Title was assigned to the invalid region header_first and has been disabled.                                                                                                [warning]
The block Powma: Contact was assigned to the invalid region footer_first and has been disabled.                                                                                              [warning]
quickstart@qs09:~/websites/pro.p1$ 

The powma module uses the token api.

joostvdl’s picture

subscribe

cutmedia’s picture

subscribing

BrightBold’s picture

subscribing

jeff_c’s picture

subscribe

rorymadden’s picture

subscribe

efarg’s picture

subscribe

killua99’s picture

subs +1.

Same thing.

<?php
    Notice: Undefined index: date-field in _token_build_tree() (line 736 of /var/www/html/htdocs/rfex.tld/sites/all/modules/token/token.module).
    Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 736 of /var/www/html/htdocs/rfex.tld/sites/all/modules/token/token.module).
    Notice: Undefined index: datestamp-field in _token_build_tree() (line 736 of /var/www/html/htdocs/rfex.tld/sites/all/modules/token/token.module).
    Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 736 of /var/www/html/htdocs/rfex.tld/sites/all/modules/token/token.module).
    Notice: Undefined index: datetime-field in _token_build_tree() (line 736 of /var/www/html/htdocs/rfex.tld/sites/all/modules/token/token.module).
    Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 736 of /var/www/html/htdocs/rfex.tld/sites/all/modules/token/token.module).
?>
sebish’s picture

Subscribe

joeyabbs’s picture

Subscribe

acoustika’s picture

subscribe

sahaj’s picture

subscribing

bensnyder’s picture

subscribe

BrightBold’s picture

Just to add more details, I get the same errors (although line 736 — I think the beta of Token is line 736). I am using the most recent versions of Date and Token — Date 7.x-2.x-dev from March 28 and Token 7.x-1.x-dev from Feb 25. The error seems to occur only on the Modules page whenever I enable a new module.

Steven.Pescador’s picture

Subscribing

scthomps312’s picture

Subscribing

Oceanman’s picture

I have the same errors as #8

Also reported here http://drupal.org/node/1103032#comment-4315946
Undefined index: date-field in _token_build_tree()

Dig1’s picture

Yep same here.

With Date 7.x-2.x-dev and Token 7.x-1.0-beta1 I get:

Notice: Undefined index: date-field in _token_build_tree() (line 737 of domain/sites/all/modules/token/token.module).
Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 737 of domain/sites/all/modules/token/token.module).
Notice: Undefined index: datestamp-field in _token_build_tree() (line 737 of domain/sites/all/modules/token/token.module).
Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 737 of domain/sites/all/modules/token/token.module).
Notice: Undefined index: datetime-field in _token_build_tree() (line 737 of domain/sites/all/modules/token/token.module).
Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 737 of domain/sites/all/modules/token/token.module). 

With Date 7.x-2.x-dev and Token 7.x-1.x-dev I get the same but the line number is 736 not 737:

Notice: Undefined index: date-field in _token_build_tree() (line 736 of domain/sites/all/modules/token/token.module).
Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 736 of domain/sites/all/modules/token/token.module).
Notice: Undefined index: datestamp-field in _token_build_tree() (line 736 of domain/sites/all/modules/token/token.module).
Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 736 of domain/sites/all/modules/token/token.module).
Notice: Undefined index: datetime-field in _token_build_tree() (line 736 of domain/sites/all/modules/token/token.module).
Warning: Invalid argument supplied for foreach() in _token_build_tree() (line 736 of domain/sites/all/modules/token/token.module).

So this indicates that changes in Date 7.x-2.x-dev impact on Token 7.x-1.x-dev....(sorry to state the obvious :))

Dig

Dave Reid’s picture

Status: Active » Closed (duplicate)

This is a duplicate of #1103032: Document how to use date tokens which is an issue in Date module which jumped the gun on providing field tokens.