Body: <p>We have been seeing custom fields added to a profile, though not set to read-only, appearing as read-only in the profile preview. Clearing the cache temporarily cures the problem, but it recurs later. Any suggestions?</p>
  <p>We are seeing this in CiviCRM 5.56.0 and 5.55.2 under Drupal 9.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-02T17:00:47.840Z
Comments.Text: The issue is still with us in 5.56.1. I suspect a corrupt cache, since if I comment out lines 733 and 744, i.e. removing an if statement in <drupal root>/vendor/civicrm/civicrm-core/CRM/Core/BAO/UFGroup.php, the problem goes away.
Comments.UserDisplayName: Stephen Palmstrom
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-03T12:00:07.157Z
Comments.Text: On further research, it seems sensible to check if there are any custom fields in the cache that purports to contain them, and if there aren't, to recreate the cache.
Comments.UserDisplayName: Stephen Palmstrom
Tags: <custom-fields><profile>
Title: Non-read-only custom fields appear as read-only in profiles
ThreadText: # Non-read-only custom fields appear as read-only in profiles
  
  (Asked by: username_0 on 2022-12-14)
  
  We have been seeing custom fields added to a profile, though not set to read-only, appearing as read-only in the profile preview. Clearing the cache temporarily cures the problem, but it recurs later. Any suggestions?
  
  We are seeing this in CiviCRM 5.56.0 and 5.55.2 under Drupal 9.
  
  **Tags:** custom-fields, profile
  
  > **Comments:**
  > **username_0**: The issue is still with us in 5.56.1. I suspect a corrupt cache, since if I comment out lines 733 and 744, i.e. removing an if statement in <drupal root>/vendor/civicrm/civicrm-core/CRM/Core/BAO/UFGroup.php, the problem goes away.  
  > **username_0**: On further research, it seems sensible to check if there are any custom fields in the cache that purports to contain them, and if there aren't, to recreate the cache.  
  
  ---
  
  ## 0 answers
  
  