1

On civicrm 5.20.1 under WordPress, we have added two custom fields to the Registration Info profile (gid=12). We've added that profile to the Online Registration config for one event.

Now and then, for reasons unknown, those fields will stop displaying: on the online registration form, and in the profile preview. Flushing caches (with cv flush or with the "Cleanup Caches" button at q=civicrm%2Fadmin%2Fsetting%2FupdateConfigBackend&reset=1) causes them to reappear.

Then sometime later, they disappear again, until caches are again flushed.

I've verified that neither the profile fields nor the custom fields are being disabled, nor are there any changes in user permissions, ACLs, profile config, custom field config, etc. The only corrective measure is to clear caches.

Is this a known issue in any 5.x version of civicrm? Naturally we're working toward an upgrade to the latest security release, but it would be nice to have some reason to believe that such upgrade might also address this mysterious issue; or to have any other way to address it besides periodically flushing caches.

2

I had this experience with a Drupal 8 site and fixed it by enabling the permission "access custom fields" for anonymous visitors.

In our case, the issue was that anonymous visitors couldn't access the custom fields, so if the cache was cleared, it would get populated via the anonymous access rules and that same cache was used for everyone.

Clearly there was also an underlying caching problem going on.

| improve this answer | |
  • I had the same issue on a Drupal 7 site, and can confirm that enabling that permission solved the problem. – AlainB Sep 16 at 7:28
2

The only way we could solve this was turning off php opcache in fpm/apache/nginx and cli

For other sites with opcache turned off we had to enable schedule job 'Clean-up Temporary Data and Files' with parameters

dbCache=1

tplCache=1

Incase you have memcache enabled then memCache=1

| improve this answer | |
  • Pradeep, you're saying that by merely disabling php opcache, this problem went away and never reappeared? – TwoMice Sep 11 at 20:43
  • Yes.... thats how we fixed it – Pradeep Nayak Sep 11 at 21:11
  • Its temporary but we need to fix the underlying issue in core – Pradeep Nayak Sep 11 at 21:12
  • I do not have opcache installed. But still experiencing this on php 7.3.x – Tapash Sep 12 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.