Closed (fixed)
Project:
Entity reference
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2012 at 20:49 UTC
Updated:
6 Jan 2017 at 20:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Nimajn commentedI have the same problem.
Comment #2
matt bComment #3
drasgardian commentedremains an issue in the latest dev
Comment #4
JvE commentedThe module sets the #default_value of a checkboxes element to $this->options['search_fields']
this can be NULL, while the only allowed value is an array.
A patch to change
'#default_value' => $this->options['search_fields'],
to
'#default_value' => isset($this->options['search_fields']) ? $this->options['search_fields'] : array(),
is attached.
Comment #5
JvE commentedComment #6
rwilson0429 commentedI was able to set an Entity Reference search field without the use of the patch.
You can select your entity reference search field by doing the following:
If this doesn't work, apply the patch in #4, flush caches, then follow the steps above.
Comment #7
cinnamon commentedFor me the solution was to update views and ctools. This patch did nothing
Comment #8
seafront commentedI found checking the search fields box in the entity ref list settings as rwilson0429 suggested worked - but the error message remained until I'd saved the view. At which point it vanished.
Usability for this ought to be addressed.
Comment #9
JvE commentedThe patch addresses a code bug where a variable that can be NULL is used in a place where only an array is allowed.
If you have error reporting on (recommended during development) you will get a "Warning: Invalid argument supplied for foreach() in form_type_checkboxes_value()" when you click on Settings in the Format section.
This will prevent you from reaching the screen rwilson0429 shows and creating the display.
Comment #10
Yaron Tal commentedThe patch in #4 works for me.
Without the patch I get
To reproduce:
1. Create a new view with no page or block.
2. Add an Entityreference display.
3. Click on "Settings" for the format.
Step 3 gives me an error. The patch fixes this.
Comment #11
intrafusionI can also confirm that the patch in #4 works for me and the steps to reproduce in #10 are correct.
Please can we get this applied to the module and new release created? #2050653: Roll a 1.1 release?
Comment #12
ctapial commentedI confirm that #6 did the trick for me. So simple...
Comment #13
rwohlebYep, patch from #4 worked for me. Since this has been reviewed/tested, let's get this committed :)
Comment #14
morsokPatch 4# worked for me too. Thx !
Comment #15
nmancini commentedPatch worked for me - thanks much!
Comment #16
sonicthoughts commented#10 worked for me. drush cc, change settings. Not at all intuitive thought.
Comment #18
electrocret commented#4 worked for me. Thanks!
Comment #19
shailu29 commented#10 worked for me
Comment #20
eawheeler commentedApplying the patch in post # 4 to 7.x-1.1 resolved this for me.
Comment #21
sonicthoughts commentedPlease commit.
Comment #22
jami commentedPatch 4 fixed this for me as well. Thank you!
Comment #23
gparsloe commented#6 just worked for me.
Comment #24
prsnjtbarman commented#6 solves the problem
Comment #25
bmateus commentedHad this problem again... Patch #4 solves it, could not access the instructions in #6 as it breaks with an AJAX error.
Comment #26
thmohd commentedPatch 4 is for dev. do you guys have patch for the released version.
Comment #27
andrbmgi commented#4 worked for me in 7.x-1.1 (not dev) had AJAX error before.
Comment #28
bohemier commentedJust had this problem too. Using a drupal 7.42 with views 7.x-3.13 & entityreference 7.x-1.1. Patch in #4 resolved the issue.
Comment #29
owntheweb commentedI just had this issue with Drupal 8.1.1. To reproduce:
Workaround:
After seeing the error, in a new tab, clear the cache at Configuration -> Performance. Refresh the views tab and choose Settings next to Format: Entity Reference list.
UPDATE:
I posted this under the wrong issue (wrong version of Drupal). Apologies, coffee still soaking in...
Comment #30
calefilm commentedConfirm #6. Thank you.
Comment #31
arunkumarkPatch #4 Working Fine.
Comment #33
spotzero commentedCommitted.