1

I've created a new field in Drupal 8, the field type is an Entity Reference and the type of item is set to Field Storage.

When I edit my page, I select the node I want to reference, save and publish, but nothing shows on the page, when I go back into edit, the field it says:

– Restricted access – (node.field_field_name)

What's going on?

2
  • What do you intend to achieve by creating a reference to field storages?
    – Berdir
    Commented Jan 16, 2016 at 2:25
  • @berdir Mostly just a discovery of what referencing field storages does. I'm trying to find a way to create an index for a content type based off of several of the fields found on each page. This looked somewhat promising.
    – ShemSeger
    Commented Jan 16, 2016 at 2:51

1 Answer 1

1

The reason you see that is that you don't have view access to field storages.

In Drupal Core, there is no access control handler for them because they're managed behind the scenes and never really edited/viewed/deleted. That happens automatically through field configs.

You can add implement hook_field_storage_config_access() (look for hook_ENTITY_TYPE_access() for documentation) and allow view access to your users. But....

I'm trying to find a way to create an index for a content type based off of several of the fields found on each page.

I don't understand that. I'm not sure you're on the right track and before spending time to implement access control, I'd try to confirm that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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