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) »
  • Error message in profile form submission in WordPress
Pages: [1]

Author Topic: Error message in profile form submission in WordPress  (Read 642 times)

phdeviate

  • I’m new here
  • *
  • Posts: 16
  • Karma: 2
  • CiviCRM version: CiviCRM 4.4.3
  • CMS version: WordPress
  • MySQL version: 5
  • PHP version: 3.3.10.4
Error message in profile form submission in WordPress
January 27, 2014, 07:26:16 am
I have a profile up on a page, successfully (my "duplicate text problem" doesn't happen if the form is *alone* on the page). When I submitted a test, it *worked* (that is, all the info got into the database successfully and my notification email arrived, and all that) but the end user got a an error. Here's the error:

Warning: in_array() expects parameter 2 to be array, null given in /home/phdeviate/phdeviate.com/wp-content/plugins/civicrm/civicrm/CRM/Core/Permission.php on line 262

So I pulled up the php file and here's what's going on at line 262:
 $groups = self::ufGroup($type);
    return in_array($gid, $groups) ? TRUE : FALSE;
  }

(The line beginning "return" is line 262, I figured that 261 would be useful for context)

If I'm reading this correctly, something is going awry with ascertaining whether the user is already a member of a group or with adding the user to the group (this profile *is* directed to add everyone who fills it out to a certain group and that *did* work for my test user)

Thoughts? The function is fine, but I think that the end user would be put off by seeing that error.

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Error message in profile form submission in WordPress
February 10, 2014, 11:25:56 am
CiviCRM is full of PHP "notices" and "warnings".  These are not errors per se, and will not normally cause problems, but I agree you should suppress them.   Normally there is a setting to do this in your server PHP configuration (.htaccess or php.ini) or within Wordpress itself.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

phdeviate

  • I’m new here
  • *
  • Posts: 16
  • Karma: 2
  • CiviCRM version: CiviCRM 4.4.3
  • CMS version: WordPress
  • MySQL version: 5
  • PHP version: 3.3.10.4
Re: Error message in profile form submission in WordPress
February 18, 2014, 08:13:28 am
Could you elaborate more on how to suppress such error messages or link me to an explanatory document? I'm not having a lot of success with it...

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Error message in profile form submission in WordPress

This forum was archived on 2017-11-26.