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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Contribution Page Fails after 4.3.7 to 4.4.1
Pages: [1]

Author Topic: Contribution Page Fails after 4.3.7 to 4.4.1  (Read 1472 times)

aglozier

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 9
    • Phoenix Academy
  • CiviCRM version: 4.7.9
  • CMS version: WordPress 4.6.1
  • MySQL version: 5.7.14
  • PHP version: 5.6.21
Contribution Page Fails after 4.3.7 to 4.4.1
November 15, 2013, 08:04:51 am
I'm testing 4.4.1 on a test website and noticed that our contribution page has quit working.  I get the following message:

Code: [Select]
Fatal error: Call to a member function freeze() on a non-object in /home/phoenix/www/test/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Edit/Address.php on line 484
Our online event registration page works under 4.4.1.  My test website is installed in a subdirectory called "wordpress'.  I disabled all plugins except CiviCRM.

We use PayPal standard as our payment processor and a profile (see image) to collect donor information (name, address, phone).  If I disable the profile I don't get the error.

Any ideas on what is causing this or how to fix it.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Contribution Page Fails after 4.3.7 to 4.4.1
November 18, 2013, 06:16:08 am
Can you please replicate this on demo?

Thanks
Kurund
Found this reply helpful? Support CiviCRM

aglozier

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 9
    • Phoenix Academy
  • CiviCRM version: 4.7.9
  • CMS version: WordPress 4.6.1
  • MySQL version: 5.7.14
  • PHP version: 5.6.21
Re: Contribution Page Fails after 4.3.7 to 4.4.1
November 20, 2013, 04:35:05 am
I was unable to replicate this on the demo site which lead me to dig deeper.  In the profile I used there is a disabled 'country' field.  If I enable it the error goes away.  If I disable or delete the 'country' field I get the error.  Strangely, if I disable both the 'country' and 'state' field I don't get the error.  I'm also able to trigger the error using the "Name and Address" profile.  I can't duplicate this on the demo site.

I noticed there was differences in the "Name and Address" profile between my test site and the demo site.  This was is new (in 4.4) "Searchable" column.  In my test site some fields had a value of 'yes' whereas in the demo site they were all 'no'.  My test site differs from the demo site in that I have a converted 4.3.7 database.  I added a new profile with the same fields as the 'Name and Address' profile.  I still get the error using this profile when I disable the 'country' field.

I also switch to the 2013 Wordpress theme and added a new contribution page using the profile.  I still get the error.

What else might differ between my test site and the demo site that could cause this error?  Why would the 'country' field cause this error?

aglozier

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 9
    • Phoenix Academy
  • CiviCRM version: 4.7.9
  • CMS version: WordPress 4.6.1
  • MySQL version: 5.7.14
  • PHP version: 5.6.21
Re: Contribution Page Fails after 4.3.7 to 4.4.1
November 21, 2013, 08:02:43 am
I removed CiviCRM from our test website.  I then install a fresh version 4.4.2 and with the sample database.  I added the "Name and Address" profile to the "Support CiviCRM" contribution page and disabled the "Country" field.  It worked as expected.

I deleted the database, loaded a copy of my production database and upgraded from 4.3.7 to 4.4.2.  I still get the error I originally reported.  If I enable the 'Country' field or disable the 'State' field in my profile it works.

It fails using the "Test" payment processor so it's not caused by the PayPal processor.

I have to conclude it's something in our database that is the problem.  What could it be?  A system setting?

aglozier

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 9
    • Phoenix Academy
  • CiviCRM version: 4.7.9
  • CMS version: WordPress 4.6.1
  • MySQL version: 5.7.14
  • PHP version: 5.6.21
Re: Contribution Page Fails after 4.3.7 to 4.4.1
November 21, 2013, 01:06:07 pm
I finally replicated this on the test site.  It doesn't display the error message but it breaks the donation page.  I left it broken.  Log in to the WordPress demo and "test-drive" (or Live Page) the "Help Support CiviCRM!" contribution page.

Here's how to configure the WordPress demo site to replicate it.
 
  • Synchronize a CiviCRM contact to a WordPress user.  I used demo and "Michael CIM."
  • Have the contact share a household address.
  • Add the "Name and Address" profile to the "Help Support CiviCRM!" contribution page.
  • Disable the "Country" field in the profile.
  • "test-drive" (or Live Page) the "Help Support CiviCRM!" contribution page.

I found this after I had enough sense to read the code and noticed the state freeze for shared household addresses.  The code is:

Code: [Select]
      // CRM-7296 freeze the select for state if address is shared with household
      // CRM-9070 freeze the select for state if it is view only
      if (isset($form->_fields) &&
          CRM_Utils_Array::value($stateElementName, $form->_fields) &&
          (CRM_Utils_Array::value('is_shared', $form->_fields[$stateElementName]) ||
          CRM_Utils_Array::value('is_view', $form->_fields[$stateElementName]))
      ) {
        $stateSelect->freeze();

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Contribution Page Fails after 4.3.7 to 4.4.1
November 25, 2013, 06:21:06 am
thanks for the detailed info. I have filed: http://issues.civicrm.org/jira/browse/CRM-13824

Kurund
« Last Edit: November 25, 2013, 06:50:38 am by Kurund Jalmi »
Found this reply helpful? Support CiviCRM

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Contribution Page Fails after 4.3.7 to 4.4.1
November 25, 2013, 06:57:34 am
Can you try this patch: https://github.com/civicrm/civicrm-core/pull/2082

Kurund
Found this reply helpful? Support CiviCRM

aglozier

  • I post frequently
  • ***
  • Posts: 135
  • Karma: 9
    • Phoenix Academy
  • CiviCRM version: 4.7.9
  • CMS version: WordPress 4.6.1
  • MySQL version: 5.7.14
  • PHP version: 5.6.21
Re: Contribution Page Fails after 4.3.7 to 4.4.1
November 25, 2013, 08:22:33 am
I installed the patch on both my test and production sites and it work!

Thanks a lot for you help, Kurund.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Contribution Page Fails after 4.3.7 to 4.4.1
November 26, 2013, 11:16:11 pm
great.. thanks

Kurund
Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Contribution Page Fails after 4.3.7 to 4.4.1

This forum was archived on 2017-11-26.