Closed (fixed)
Project:
Views Reference Field
Version:
8.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2018 at 04:24 UTC
Updated:
24 May 2026 at 14:30 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
sonnyktComment #3
sonnyktComment #4
sonnyktComment #5
gargsuchi commentedLooks Good!
Thanks @sonnykt.
Comment #6
seanbThanks for working on this. Here is a quick review of the code. Mostly nits. The access checks for the views edit page seems to be the most important blocker for now.
We usually don't type hint strings.
Nit: The indentation is wrong on this one.
Can we use the routes here instead of the internal URI? Besides that these routes are coming from the Views UI module which might not be enabled. I guess the check should apply to this section as well. Maybe just move the whole section inside
if ($output_as_link) {?Besides that, a user might not have permissions to edit the view. Let's check for that as well.
Can we move this comment above this whole section and change it to something like: Move field item attributes to the link element.
Comment #7
jastraat commentedModified the patch to address the comments in #6. Also adjusted the patch to use the administrative label of the view versus the title since in may cases a view might not be displaying a title. This is also more consistent with the field widget UI.
Comment #8
omar alahmedPatch in #7 works with me. Thanks
Comment #9
joegraduateWe are using #7 and it works well. This is a great improvement to the module. Would love to see this get committed and included in a release.
Comment #10
seanbOne thing that still needs work:
Can we use the routes here instead of the internal URI? Besides that these routes are coming from the Views UI module which might not be enabled. I guess the check should apply to this section as well.
Besides that, a user might not have permissions to edit the view. Let's check for that as well.
Comment #11
jastraat commentedThe following code from the patch in 7 should address checking that views_ui is enabled and that in order to be linked, the user must have the administer views permission.
I rerolled the patch from 7 to use routes instead of internal URIs.
Comment #12
jastraat commentedComment #13
seanbYou are right, sorry I missed that. I'll try to test this out soon. If someone else has time to give this a go and RTBC it then please feel free to do so.
Comment #15
sonnyktCreated an MR using patch #11 and updated the new formatter to use proper dependency injection.
Comment #16
kristen polDiff of MR and patch in #11.
Comment #17
samuhe commentedSeems like patch in 11 is working correctly. Thank you for the patch.
Comment #19
trackleft2Fixing PHPCS issues:
Comment #20
trackleft2Adding static patch with updates.
Comment #21
shortspoken commentedMarking this RTBC as I am using this patch in several projects successfully. Please merge.
Cheers, Moritz
Comment #22
joegraduateAgree with @shortspoken that this is RTBC. Updated the MR branch with the latest commits from 8.x-2.x including test fixes (unrelated to the MR). All pipelines pass on the MR now.
Comment #24
anybodyRebased
Comment #26
scott_euser commentedThanks for the patience with this. I reviewed and found that we had missing schema + fixed some code nitpicks + added test coverage. Given that I did the fixes myself in this, can someone check and move back to RTBC if happy with my changes. Then I'll merge it in. Thanks!
Comment #27
joegraduate@scott_euser, your latest changes to the MR look good to me. Good catch on the missing config schema and good call on adding test coverage.
Comment #28
anybodyNice! This will be very helpful for different kind of previews where viewsreference is used, e.g. layout paragraphs!
Looking very much forward to the next release! 🎉
Comment #31
scott_euser commentedThanks everyone!
Comment #33
anybodyThanks @scott_euser this is helpful! Could you also tag a new release with this soon? That would be fantastic!
Comment #34
anybodyPS: Sorry just saw #3019753: Plan for Views Reference Field 8.x-2.0 release if you don't want to tag another beta release before.