I want to provide a locked Field API field (see field_create_field()) via a Feature module but it seems impossible to do so because field_features_export_render() explicitly unsets $field['field_config']['locked']. Why would this be unset? I don't see any harm in letting that be exported.

CommentFileSizeAuthor
#1 1567506-export-locked-field.patch670 bytesDave Reid
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Needs review
FileSize
670 bytes
hefox’s picture

My guess is the same reason that can't export a view as disabled (at least in d6 views); when it was being written, whoever wrote it thought that setting would not be wanted.

If it works, seems like a good change.

edit: For those reading along: locked prevents editing via the UI. That seems like a *really* great thing to have for features module; actually, it'd be nice to set that on export so sites using the feature cannot edit, but those creating it can.. hm. that's a pipe dream and not sure how that'd even work correct.

Dave Reid’s picture

This has worked just fine so far with local testing. Features shouldn't add locked by default but it is something interesting to consider down the road.

mpotter’s picture

Status: Needs review » Fixed

I agree that this was probably a left over from the past. Committed and pushed in c39f5a9. Marking as fixed but if somebody thinks this can also safely be done in D6, feel free to port the patch and reopen this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.