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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Issues with Setting Field State to View Only
Pages: [1]

Author Topic: Issues with Setting Field State to View Only  (Read 402 times)

mmitchell

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: Ver 14.14 Distrib 5.5.37
  • PHP version: 5.5.9
Issues with Setting Field State to View Only
July 08, 2014, 09:35:02 am
Hi Guys, I hope this is in the correction section. I am working on my first implementation of CiviCRM for a client and for the most part things are pretty smooth and have only ran into one major bug.

My client does collect end user's "work" address but does not want the end user to be able to directly update their address. They want them to go through a change address process so that they can have a change recorded and make sure on the back end everything reflects the new address. They have noticed over the years that address changes are the best way to discover when a member switches companies, and due to their membership structure it is important to know when this happens.

I believed this was a simple enough request, I created a new address profile called "Work Update" that users could enter data into to update their "Work" address. Having said that they are allowed to "View Only" their "Work" address on any form that is appropriate and in their profile on Drupal. This works for the most part if the user is already registered, if their work address is blank, it will show a blank field for all address lines.

The issue begins when you try to register for a new account. The "View Only" "Work" address is on the profile that is filled in on account creation. The "Work" address filled are NOT required, but they are View Only. On the /user/register page, you will get:
Code: [Select]
[Tue Jul 08 11:11:04.308627 2014] [fcgid:warn] [pid 5572] [client ###.###.###.###:62216] mod_fcgid: stderr: PHP Fatal error:  Call to a member function freeze() on a non-object in /var/www/clients/client1/web9/web/sites/all/modules/civicrm/CRM/Contact/Form/Edit/Address.php on line 484, referer: http://example.com/user/login?current=node
If you set the "State" address filed to NOT View Only, and leave the rest as View Only, everything will work fine, but then they can change their state. The error has to do with freeze() function but I can't figure out how to correct this with out breaking the View Only.

I have also noticed that you can't Preview the profile while you have a State filed set to View Only.

I have created a bug for this but I thought I might get quicker support on the forum, and if a solution is discovered it can be submitted to the bug as a patch. https://issues.civicrm.org/jira/browse/CRM-14959

Any thoughts? Could really use some help on this.

Thanks,

Micah

mmitchell

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.4
  • CMS version: Drupal 7
  • MySQL version: Ver 14.14 Distrib 5.5.37
  • PHP version: 5.5.9
Re: Issues with Setting Field State to View Only
July 09, 2014, 09:38:26 am
A patch has been posted in the CiviCRM Issue tracker that I linked above.

https://issues.civicrm.org/jira/browse/CRM-14959

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Issues with Setting Field State to View Only

This forum was archived on 2017-11-26.