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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.4 and 4.0 Releases Testing »
  • create new individual error message
Pages: [1]

Author Topic: create new individual error message  (Read 1184 times)

cord1

  • I’m new here
  • *
  • Posts: 4
  • Karma: 1
  • CiviCRM version: 4.0.beta2
  • CMS version: Drupal 7
  • MySQL version: 5.1.53-4.7.1-x86_64
  • PHP version: 5.3.5-5.12.1-x86_64
create new individual error message
April 14, 2011, 02:53:24 pm
New to CiviCRM. Installed D7 and civicrm-4.0.beta2-drupal.tar.gz.

Add new Individual gives the  following message:
Notice: Undefined variable: mode in CRM_Core_Form_Tag::buildQuickForm() (line 168 of /srv/www/htdocs/D70/sites/all/modules/civicrm/CRM/Core/Form/Tag.php).

in line 61 write:
    $mode = "";
to define the variable.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: create new individual error message
April 14, 2011, 03:34:12 pm
Looks like that code has been refactored a bit for beta 3 and I'm not seeing $mode used in line 168 and not getting that error. Can you check the latest?
Protect your investment in CiviCRM by  becoming a Member!

cord1

  • I’m new here
  • *
  • Posts: 4
  • Karma: 1
  • CiviCRM version: 4.0.beta2
  • CMS version: Drupal 7
  • MySQL version: 5.1.53-4.7.1-x86_64
  • PHP version: 5.3.5-5.12.1-x86_64
Re: create new individual error message
April 14, 2011, 05:26:16 pm
First of all, today was my first look at CiviCRM.
Wow, what a product! Great job!

Conserning     static function buildQuickForm(X)

Not able to reconstruct error at the moment with beta3, but the code looks the same.

I think the error came due to variable scop.

In line 90-99, the variable $mode is defined inside a switch, aka local.

line 180 says:     $form->assign( "tagsetInfo_$mode", $tagset );

Line 180 is outside the switch and do not know the local variable in 90-99 due to the scop

If you define the variable at line 60 ($mode = "";), then the variable will be "global" for the function,

and the line in 180 will find it with the new value $mode got in line 90-99.

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: create new individual error message
April 14, 2011, 05:53:15 pm

fixed. though i do think that with the restructuring, $mode should always be assigned if $tagset is not empty

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 3.4 and 4.0 Releases Testing »
  • create new individual error message

This forum was archived on 2017-11-26.