Closed (duplicate)
Project:
Entity reference
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2014 at 01:30 UTC
Updated:
17 Oct 2019 at 14:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jygastaud commented@thoughmas,
I'm moving that issue to Entity Reference too as it's not concern directly Entity connect.
Comment #2
aniebel commentedI would consider this a fairly important request since it appears that there are 10 or fewer results while in reality, it could be a lot more.
Comment #3
fbrooks commentedI am providing a patch for consideration that contains this functionality.
Thanks
Comment #4
nategasser commentedPatch in #3 worked great, thanks.
Comment #5
gazzur commentedPatch #3 works fine for me.
Comment #6
saniyat commentedPatch #3 works perfectly.
Comment #8
kris77 commentedPatch #3 works fine for me too.
I use EntityReference 7.x-1.1 and Drupal 7.50
Comment #9
mustanggb commentedNice idea, test failure was unrelated to the patch and a re-run now passes fine, so marking RTBC as per #6.
Comment #10
spotzero commentedThis throws a warning unless you re-save everything.
Notice: Undefined index: max_results in entityreference_autocomplete_callback_get_matches() (line 1063 of /var/www/html/drupal/sites/all/modules/entityreference/entityreference.module).
Comment #11
nwom commented#3 worked perfectly. Thank you!
Comment #12
dani3lr0se commented#3 worked well for me as well. Thanks! I'm going to change this back to reviewed and tested by the community since it worked without any issues.
Comment #13
minoroffense commentedI haven't seen anyone address @spotzero's warnings. Putting back to needs work.
Comment #14
fbrooks commented@spotzero can you provide the steps for recreating the warning?
Thanks
Comment #15
spotzero commentedJust make sure that "$settings['max_results']" exists before using it, because it doesn't exist until the setting form is re-saved.
Comment #16
fbrooks commentedI am unable to reproduce the warning on 7.54 with the latest 7.x-1.x-dev of entityreference. I created a content type, added an entityreference field, applied the patch, and then edited the entityreference field's settings. I am seeing no warnings.
@spotzero, could you retry with the HEAD of 7.x-1.x?
Thanks
Comment #17
francescoq commentedI applied #3 and i had the warnings, but everything went fine after flushing all cache.
I think the issue simple was that without flishing the caches the field doesn't read the default of 10 elements to show (the field was empty until the flush, but showed '10' after the flush)
I think this is RTBC
Thanks!
@spotzero if you download entityreference, apply patch, then create fields everything goes right first try, i think the issue exists only for already existing fields.
Comment #18
alex72rm commentedHope to have the patch applied to -dev ;)
Comment #19
mustanggb commentedPatch does apply against dev, and that's not what the "Patch (to be ported)" status is for either, so restoring status.
Comment #20
Anonymous (not verified) commentedPatch #works fine, please commit
Comment #21
minoroffense commentedTo avoid warnings after applying the patch, if all that's required is a cache clear, we'll need an update hook to trigger a cache clear (technically speaking update.php should clear the cache anyways so we could get away with an "empty" update hook but I'd prefer an explicity cache clear call).
Moving to "needs work" so we can add the update hook.
Comment #22
bramvandenbulcke commentedI wanted to change the autocomplete output to 50 on a website with different related content fields. I only needed to change the value under 'Get an array of matching entities' from 10 to 50:
Comment #23
vinmassaro commented@minorOffense: here is an updated patch that flushes caches in an update hook. Thanks!
Comment #24
squarecandy commented#23 works great. Thank you.
Comment #25
estebanvalerio.h commentedSince DEV version was updated today, patch #3 was giving errors due to lines mismatch, here's an update for patch #3.
Comment #26
joelpittet@estebanvalerio.h not sure if you meant to remove the cache clear form #23, but here's a patch that is a bit more specific and less drastic of a clear.
field_info_cache_clear();instead ofdrupal_flush_all_caches();LMK if it needs more clearing.
Comment #27
ultrabob commentedI tested #26 in desktop browsers and smartphone. Because I applied a patch I still had to clear cache to avoid errors showing up, but once I cleared cache it worked like a charm everywhere I tested it.
Comment #28
scotwith1t+1 for this one! Let's get it in and 1.6 release out! :)
Comment #29
minoroffense commentedWe still need a test to validate the functionality. If anyone is feeling keen enough to add the test.
Comment #30
welly commentedIgnore me, it's fine.
Comment #31
welly commentedComment #32
darkodev commentedIsn't this already addressed here? https://www.drupal.org/project/entityreference/issues/1700112
We've been using that patch for a while and it works great.
Comment #33
joelpittetThanks for pointing that out, the other one is better but missing entityreference_field_widget_info changes that this one is, and the cache clear.
Closing as a duplicate of #1700112: Entity reference list View Pager: Items to display is broken