In Drupal 7 this used to work so I am assuming it is something not yet applied to Drupal 8 version or maybe the function has been changed intentionally.
If you add "Link to edit Content" as a field to a view (block or page display) to allow admin users to easily find and and edit each listed item, the view is no longer publicly visible. The access permissions are still as default set to "view published content", and the view is publicly visible without this field added.
This was something that was very useful for views like sliders where the content is not otherwise easily found in order for admins to edit.
In Drupal 7 the "edit" link was only seen by users with permission to edit the node, so the field was not public, but the rest of the view was public.
Is this something that is likely to be possible in future, or does anyone know of a workaround?
Thanks
Comments
Comment #2
LendudeIf I understand correctly, you would want the View to not be accessible to people without node edit permissions if the 'Edit link' field is shown?
This doesn't work in D7 either, and really doesn't sound like expected behaviour.
And like D7 , in D8 the 'edit' link is only shown if you have the right permissions.
You say the behaviour you are looking for works in D7, so could you provide some basic steps to reproduce the behaviour you are looking for?
Comment #3
gsquirrelNo that is not what I meant.
I want the view to be visible to everyone, as it would be in D7, where the only thing hidden is the edit link.
It might be the same for any individual field in a view that the current user does not have permission to see, I am not sure. In D7 that field ONLY would be hidden from view, the rest of the view would be seen as usual whether logged in or not.
So to recreate you make a new view, unformatted list type showing "fields" not teaser/full.
You add "title" as a field and any others you want.
At this stage the view is visible to all.
You add the field "Link to edit content" to the list of fields to be shown.
Now the view disappears completely unless you are logged in(with permission to edit node), also there is no explanation, so took me a while to realise that was why it disappeared.
Thanks for response, maybe this is not something other people use.
For now my workaround is not to use "fields" but teaser view where there are contextual links.
Comment #4
echoz CreditAttribution: echoz commented@gsquirrel I'm using edit links on D8 views as I did in D7, and they work as expected. The view is fine when logged out. Something else must be causing your view to become not visible to anon users.
Comment #9
cilefen CreditAttribution: cilefen commentedI am closing this support request because there have been no recent comments.
The Drupal Core issue queue is not the ideal place for support requests. Consider other sources of support.