Load default filter from node page, that's good for related taxonomy blocks - is not working with Entity Reference Display when entityreference field(autocomplete) is inside entityform but works for block display.
There are two simple content type namely Article and Book. Each content type has field called tags(taxonomy terms).
These two content type are not related to each other directly but only with taxonomy terms.
An entityform is attached to content type Article. Entityform contains the entityreference to the content Books with "entity reference view" as entity selection and autocomplete widget.
A view of Book contents is created with Entity reference display and Block display(just for testing, added to sidebar left) with contextual filter configuration as(see also screen shot)
When the filter value is NOT available
Provide default value
Load default filter from node page, that's good for related taxonomy blocks
Limit terms by vocabulary
Filter to items that share all terms.If Article node contains tags like php,drupal and Book node contains php,drupal then visiting the article node, view's block is showing data but when string is entered in autocomplete field which is attached to entity form no data is returning from view.
This means, views is working block display but failed with entity reference display when entityreference field(autocomplete) is inside entityform.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | entity_reference_view_test-7.x-1.0.zip | 3.79 KB | nithinkolekar |
| #3 | entityreference-test--with-latest-views-n-ctools.png | 56.34 KB | nithinkolekar |
| views-configuration-2.png | 25.42 KB | nithinkolekar | |
| views-configuration-1.png | 51.81 KB | nithinkolekar | |
| entityreference field configuration.png | 19.5 KB | nithinkolekar |
Comments
Comment #1
nithinkolekar commentedAfter trying several methods as http://drupal.stackexchange.com/questions/84115/menu-get-object-not-retu... I can confirm this is related to entityform.
Also I think https://drupal.org/node/2043287#comment-7750131 is somehow related to this.
Comment #1.0
nithinkolekar commentedminor
Comment #1.1
nithinkolekar commentedmajor change made for entityform
Comment #2
tedbowI think I understand what you are describing but:
It seems like it is a case that is not going effect many sites.
Have you tested it with that latest dev versions of Views, and Ctools?
Let me know.
Comment #3
nithinkolekar commentedJust finished testing with views 7.x-3.x-dev (2013-Oct-28) and ctools v 7.x-1.x-dev (2013-Sep-30), but still not working :(.
Yes thats true, but this functionality can be used effectively in large site by passing argument as parameter and reduce the search load.Best example of this is at imdb/amazon list entry.
The reason I am using entityrefrence view as source to autocomplete field is, by default autocomplete doesn't provide any parameter functionality.
Comment #4
tedbowIf you can make a Feature that exports everything need to test I will take a look at it. Otherwise I personally don't have to time to set up for testing/debuging this.
Comment #5
nithinkolekar commentedattaching the feature(just watched http://mustardseedmedia.com/podcast/episode43).
Some field is added to content type article which was bundled with drupal core,I don't know whether will it conflict while importing feature(I never used feature module :( ) .
Comment #6
nithinkolekar commented@tedbow any updates this request?
Currently I am using token as parameter to EntityReference View.
For #3 to work [node:field-book-tags] is passed as parameter but in views contextual filter config instead of "Term Ids separarted by , or +" , "Term name converted to Term ID" should be used to work. Which may not be always right when same terms are present on different as described on this module page.
So it should be great if there a bridge like this
Parent Node---Get terms on node>>>>EntityForm>>>>Pass it to views to get referenced entities via autocomplete
Comment #7
nithinkolekar commented@tedbow
I just updated developement site to drupal 7.27 , contrib modules latest version to test Use tokens for entity selection view arguments.
It seems that all node related tokens are not available/accessible to entityform module, not even on entityform type configuration.Both token and entity token modules are enabled. These node tokens are available everywhere else.
Shall I begin new issue with all req details or continue this thread ?.
Comment #8
tedbow@nithinkolekar yeah that is different issue.
Comment #9
nithinkolekar commentedforgot to mention that another issue created here node related tokens are not available/accessible to entityform module