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) »
  • Custom Data Disappears
Pages: [1]

Author Topic: Custom Data Disappears  (Read 2580 times)

rs3515

  • I’m new here
  • *
  • Posts: 29
  • Karma: 1
Custom Data Disappears
April 07, 2008, 04:54:40 am
I have a really odd situation and I'm trying to determine what happened.  We are in the process of development with Drupal 5.6 and CiviCRM 1.9.  We created a number of custom data fields in CiviCRM to display them on the user's Drupal profile (name, address, etc.).

There are two instances of our development environment, and something changed with the newer version where the custom data no longer is displayed on the Drupal profile.  I can click in Drupal on the sub-tab called "Personal Information", but nothing shows.  If I review our old environment, it is still present.

My initial thought was potentially access control, per the comments on this thread:  http://forum.civicrm.org/index.php/topic,78.0.html.  However when I wasn't able to see the custom data as an all-powerful admin, I knew something else is wrong.

What might cause this?  One of our developers had been making some changes in civicrm.settings.php but I believe we had returned to how it had been set before.  Could it be something in the CiviCRM database?  CiviNode?  Any thoughts on where to investigate would be appreciated.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Data Disappears
April 07, 2008, 11:22:42 am
Since you're still developing the site, you should consider using CiviCRM 2.0.2 as your starting point.

That said, things to check..
* Drupal Access Control -> access all custom data, profile listings and forms both checked for relevant role
* In settings for your "Personal Information" CiviCRM Profile ... User For = Profile, User Registration, View/Edit User Account
* In the profile fields - make sure all fields have record type = Individual (shows in parenthesis in the list of profile fields after each field label)
Protect your investment in CiviCRM by  becoming a Member!

rs3515

  • I’m new here
  • *
  • Posts: 29
  • Karma: 1
Re: Custom Data Disappears
April 07, 2008, 04:48:32 pm
We're very close to launch, so looking at 2.0.2 at this point is not an option.  Thanks for your suggestions on things to check.  I did examine those items and no success ...

* Drupal Access Control -> I'm logged in as site admin, and have rights to everything.
* "Personal Information" CiviCRM Profle -> profile, user registration and view/edit user account ... check, check and check.
* All profile fields with a record type = Individual (in parenthesis).

Could something have gotten corrupted in the database?  Potentially a setting in civicrm.settings.php that could be off?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Data Disappears
April 07, 2008, 05:17:48 pm
It's unlikely to be a settings file issue - more things would be broken. DB corruption is possible but also seems unlikely since you're not getting errors. You mentioned "CiviNode" - if you have that or other non-core modules enabled, I would try disabling them one at a time and seeing if that fixes the problem.

Short of that, I guess you could add debug statement(s) to code. Starting w/ civicrm/drupal/civicrm.module - in the civicrm_form_data function, you could see what's being returned in $html - after line 526 you could add:

CRM_Core_Error::debug('html',$html); exit();

... and then use this same debug function with different vars in CRM_Core_BAO_UFGroup::getEditHTML - which is evidently not returning the expected fields...
Protect your investment in CiviCRM by  becoming a Member!

rs3515

  • I’m new here
  • *
  • Posts: 29
  • Karma: 1
Re: Custom Data Disappears
April 07, 2008, 06:05:12 pm
Hmmm interesting ... $html returns the right content, and $output after it also returns what looks to be the right content.  For some reason just not being displayed on the screen.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Data Disappears
April 08, 2008, 06:45:56 am
If you have other non-core modules enabled, you might try disabling them to see if that's the issue...
Protect your investment in CiviCRM by  becoming a Member!

rs3515

  • I’m new here
  • *
  • Posts: 29
  • Karma: 1
Re: Custom Data Disappears
April 08, 2008, 09:34:03 am
Does 'uninstalling' modules just disable them, or does it delete custom content (templates, data, etc.) that has been created?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Data Disappears
April 08, 2008, 09:52:51 am
I would "hope" that disabling (as opposed to "uninstalling") a module in Drupal would not cause content to be deleted. BUT you will definitely need to verify this for any modules you have installed (by checking their documentation, posting a question for the module developer, etc.).
Protect your investment in CiviCRM by  becoming a Member!

rs3515

  • I’m new here
  • *
  • Posts: 29
  • Karma: 1
Re: Custom Data Disappears
April 19, 2008, 09:30:50 am
I've finally had a chance to work on this further and starting to think this is not module-related, but something to do with the setup of CiviCRM and how it relates to Drupal.

Our first development environment is still displaying custom CiviCRM data on user's profiles in Drupal, and the second development environment is not.  I reviewed the CiviCRM Access Control, Global Settings, Custom Data and CiviCRM Profile setup for each server.  The only difference I could find between the two is under Manage ACLs (CiviCRM > Access Control > Manage ACLs).

In the environment that works, there are dropdowns after "Group" for "Custom Data" and "Profiles".  In the environment that doesn't work, they are not displayed.  When I looked at the HTML for the Manage ACLs page, they are there, but set to "display:none".

From there I looked at the Form/ACL.php file, and saw that there is logic to display and hide these dropdowns.  However I'm a bit confused on what rules are set within CiviCRM to make sure these dropdowns are displayed.  At first I thought maybe it was a function of an individual user being assigned to an Administrator group to have access, but this doesn't seem to be the case.  On the server that works, no users in CiviCRM are assigned to any groups.

Any advice?

rs3515

  • I’m new here
  • *
  • Posts: 29
  • Karma: 1
Re: Custom Data Disappears
April 19, 2008, 09:55:58 am
Ah I see why the three dropdowns (for Groups, Profiles and Custom Data) are showing up on the other server ... the JavaScript is not working on that page and it's displaying all three rather than just the one we have selected.  Seems as though my comment above has no bearing on the problem ...

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: Custom Data Disappears
April 19, 2008, 12:41:39 pm

is javascript / images working on the site at all?

If not, you might want to check the administer civicrm >> global settings >> url screens and fix the "resource url" textbox there

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

rs3515

  • I’m new here
  • *
  • Posts: 29
  • Karma: 1
Re: Custom Data Disappears
April 19, 2008, 09:47:48 pm
Yippee ... I finally figured this out.  It was a conflicting module.  When enabled, the Drupal Profile Privacy module hides all CiviCRM custom data in the user profile.  As soon as I disabled the module, the CiviCRM fields displayed.  I have posted a bug request on this issue here:  http://drupal.org/node/248811

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Custom Data Disappears

This forum was archived on 2017-11-26.