HOW TO REPRODUCE:
1. Install drupal 7.12, features beta6, field ui.
2. Create a ct test_ct with a field called 'test_field' with a label 'TEST'
3. Create a feature with this CT called feature_test and enable it.
4. Create a content where the test_field is also filled out.
5. Revoke 'access content' permission from non-authenticated users. (Alternatively, you can use content_access module to prevent anonymous from viewing test_ct content, does not matter)
6. Now open the file feature_test.features.field.inc and rewrite the field label from 'TEST' to 'TEST1'. (We need this so that the feature gets rebuilt in the next step.)
7. Run cron or drush cc all

RESULT:
The data from test_field disappears.

REASON:
Both cron and drush cc all runs drupal functions as non-authenticated users. During their run features_flush_caches() is called which in the end calls field_features_rebuild(). This in turn calls the field_update_field() core function for every field. In this function there is a
$has_data = field_has_data($field);
line (field.crud.inc, line 257) which gives false for non-authenticated users.

Comments

czigor’s picture

I think we need to implement a hook_field_update_forbid to solve this.

czigor’s picture

Status: Active » Closed (duplicate)
czigor’s picture

Issue summary: View changes

typo