Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using views to support the list of nodereference items if the item is not present in the list of _nodereference_potential_references
a validation error occurs on submit. This post may very-well be a valid reference and is only scoped by the view reference. The attached patch makes this option a configuration option for the reference.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1343864_cck_nodereference_views_select_enforce.patch | 4.54 KB | christianchristensen |
Comments
Comment #1
christianchristensen CreditAttribution: christianchristensen commentedComment #2
christianchristensen CreditAttribution: christianchristensen commentedPossibly related #114346: This post can't be referenced
Comment #3
cravecode CreditAttribution: cravecode commentedThank you so much for this patch, works great
Comment #4
havelinux CreditAttribution: havelinux commented@christianchristensen thank you very much for this patch !!! You have saved me many "madness hours".
Comment #5
tangent CreditAttribution: tangent commentedThis patch works for me. After upgrading to views 3.x it was impossible to add more than 10 items to a node reference field, I suppose due to the autocomplete limit.
Comment #6
fonant CreditAttribution: fonant commentedApplying the patch in #1, and ticking new new nodereference option "Enforce view items in reference list." fixes the problem I had where, like tangent, I could only add ten items to an "unlimited" nodereference field.
Comment #7
lvaldeon CreditAttribution: lvaldeon commentedWorks like a charm ! Thank you Chris