CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • "Undefined index" errors on thank you pages
Pages: [1]

Author Topic: "Undefined index" errors on thank you pages  (Read 2044 times)

curious-trick

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
"Undefined index" errors on thank you pages
February 22, 2013, 12:39:15 pm
I just setup a fresh instance of Civi 4.2.8 on a host that that runs a centralized setup of Drupal (currently 7.20) (host is May First / People Link). I made two custom data fields (about food preference and allergies), and I made two profiles: one that has those two custom fields (for event registration), the other for work trade / scholarship application, and both with a "Contact Note" as the final field.

When I register for the event (using a test name), the "Confirm your details" page works fine, and the final "thanks for registering page gives a bunch of errors (pasted below). The work trade application does the same. The forms work, the registration is registered, emails get sent -- it all works as expected, just shows a bunch of errors to the person who filled out the form.

Any ideas on what to change so these errors don't show up?

thanks,
Patrick

Here are the errors:
Code: [Select]
Notice: Undefined index: #tree in form_builder() (line 1821 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: #array_parents in form_builder() (line 1844 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: #tree in form_builder() (line 1821 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: #array_parents in form_builder() (line 1844 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: #tree in form_builder() (line 1821 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: #array_parents in form_builder() (line 1844 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: #tree in form_builder() (line 1821 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: #array_parents in form_builder() (line 1844 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: #tree in form_builder() (line 1821 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: #array_parents in form_builder() (line 1844 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in form_builder() (line 1801 of /usr/local/share/drupal-7.20/includes/form.inc).
Notice: Undefined index: complete form in _form_validate() (line 1410 of /usr/local/share/drupal-7.20/includes/form.inc).

curious-trick

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: "Undefined index" errors on thank you pages
February 22, 2013, 12:40:17 pm
This error looks similar:
http://forum.civicrm.org/index.php/topic,27493.0.html

curious-trick

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: "Undefined index" errors on thank you pages
February 22, 2013, 12:43:11 pm
I tested in both Chromium and Uzbl, and got the same errors.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: "Undefined index" errors on thank you pages
February 22, 2013, 01:08:43 pm

1. not sure how the other forum post error looks similar

2. what url are you using for event registration

3. Seems like all the notices are from drupal's form library which civi does not use.so not sure how they appear

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

curious-trick

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: "Undefined index" errors on thank you pages
February 22, 2013, 01:32:14 pm
Quote from: Donald Lobo on February 22, 2013, 01:08:43 pm
2. what url are you using for event registration

In Drupal, I set a URL alias for the registration page (which is a Civi page) and another alias for the worktrade page (which is a Drupal page). Also, the CiviEvent info page for the event is the front page of the Drupal site. Later I could test turning off those aliases, if that might be the problem.

kharding

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 4
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 7
  • MySQL version: Recent
  • PHP version: 5.3.16
Re: "Undefined index" errors on thank you pages
February 22, 2013, 03:24:11 pm
Check your reporting level in Drupal - these are notices, not even warnings.  There's a bunch of notices and not-quite-serious errors that Drupal will insist on reporting if default settings are left in place; I think Drupal recommends disabling error reporting on production sites.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: "Undefined index" errors on thank you pages
February 22, 2013, 05:06:10 pm

FYI, Within CiviCRM we are making a super strong effort to get rid of all notices and warnings in PHP 5.3 for Civi v4.3

We are also starting to fix most of the strict warnings and notices for PHP 5.4 in Civi v4.3, so please do report them and better yet help us patch / fix them in v4.3

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

curious-trick

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: "Undefined index" errors on thank you pages
February 25, 2013, 11:05:42 am
Quote from: kharding on February 22, 2013, 03:24:11 pm
Check your reporting level in Drupal - these are notices, not even warnings.  There's a bunch of notices and not-quite-serious errors that Drupal will insist on reporting if default settings are left in place; I think Drupal recommends disabling error reporting on production sites.

Changing Drupal error reporting to "database only" made these errors stop appearing. To do that, I went to the Drupal Configuration menu > Development section > Logging and errors > and switching "Error messages to display" from "All messages" to "None".

Do you think setting Drupal URL aliases for CiviCRM pages and pages with CiviCRM profile forms caused the warnings? (I can't test it on this site, since I need those URL aliases functioning.)

kharding

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 4
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 7
  • MySQL version: Recent
  • PHP version: 5.3.16
Re: "Undefined index" errors on thank you pages
February 25, 2013, 11:39:58 am
Quote from: curious-trick on February 25, 2013, 11:05:42 am
Quote from: kharding on February 22, 2013, 03:24:11 pm
Check your reporting level in Drupal - these are notices, not even warnings.  There's a bunch of notices and not-quite-serious errors that Drupal will insist on reporting if default settings are left in place; I think Drupal recommends disabling error reporting on production sites.

Changing Drupal error reporting to "database only" made these errors stop appearing. To do that, I went to the Drupal Configuration menu > Development section > Logging and errors > and switching "Error messages to display" from "All messages" to "None".

Do you think setting Drupal URL aliases for CiviCRM pages and pages with CiviCRM profile forms caused the warnings? (I can't test it on this site, since I need those URL aliases functioning.)

It's primarily just coding in CiviCRM, that while not incorrect, is generating a "notice" (basically, a hint that the code could be cleaner). There's nothign 'wrong' going on, but as mentioned above, the code could be cleaned up a bit to avoid this.

The key thing here is that the recommendation from Drupal is to not display notices or warnings on a production site; as this is a change from default, you actually have to disable them.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: "Undefined index" errors on thank you pages
February 25, 2013, 12:15:30 pm

to clarify in this case, i dont think civicrm is generating those notices. They are coming from drupal and except for my account / user reg, pretty sure civicrm does not interact with drupal's form layer

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

kharding

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 4
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 7
  • MySQL version: Recent
  • PHP version: 5.3.16
Re: "Undefined index" errors on thank you pages
February 25, 2013, 02:04:41 pm
Very true - apologies.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: "Undefined index" errors on thank you pages
March 03, 2013, 03:36:20 pm
I identified a fix for one of the errors mentioned

http://issues.civicrm.org/jira/browse/CRM-12008
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • "Undefined index" errors on thank you pages

This forum was archived on 2017-11-26.