We've got a viewfield which allows us to select from multiple views with multiple displays, but since updating from 8.x-3.0-beta1 to 8.x-3.0-beta4, we've found that we can't change to another view anymore. When attempting to change to display id block_2 of a different view, it continually reports the error "Illegal choice block_2 in Display element."

I suspect this is because of the logic used to set the display options in ViewfieldWidgetSelect - it only allows the form value to set the field options if $item_value['target_id'] hasn't already been set. For viewfields with default values, this will always be set, and therefore will always exhibit this problem.

I'll put together a patch to try and resolve this issue, or at least help to work towards a resolution.

CommentFileSizeAuthor
#4 viewfield-3085067-4.patch1.95 KBgeoffreyr

Comments

geoffreyr created an issue. See original summary.

geoffreyr’s picture

geoffreyr’s picture

Issue summary: View changes
geoffreyr’s picture

StatusFileSize
new1.95 KB

Here's a patch that we put together that appears to fix the issue. Will do a second pass for grammar in comments, but please let me know if anything else needs attention.

geoffreyr’s picture

Assigned: geoffreyr » Unassigned
Status: Active » Needs review

  • jerdavis committed 9a8347f on 8.x-3.x
    Issue #3085067 by geoffreyr, jerdavis: Cannot change selection of view...
jerdavis’s picture

Status: Needs review » Fixed

Tested and verified, thanks geoffreyr. This is pushed forward and will be in the next beta release.

Status: Fixed » Closed (fixed)

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