First of all, thanks for the great work done on the Relation Select module! I'm using it to great success on a site I'm currently developing.
However, I'm stuck with a small problem which I hope someone might be able to point me in the right direction.
I'm building a multilingual site, and I would like to limit the relations between nodes to nodes of the language.
To achieve this, I have created a view that can take this language as an argument, and filters the 'relatable' nodes accordingly using the "content: language" context.
Now the final step in the puzzle would be to set the argument on the view that's used by Relation Select, but this is where I'm getting stuck. I tried using $view->set_arguments(array($some_language)); inside the "relation_select_element_process" method (where the view seems to be loaded) in relation_select.module, but it seems to have no effect at all. The arguments aren't passed to the view.
Does anyone know if there is another place where I should be adding arguments? Or am I using the wrong way to add arguments to the view?
--
Thanks in advance,
Ruben Vreeken
Comments
Comment #1
ruben_vreeken commentedI'm closing this issue. Turns out all of this isn't necessary when using Entity Translation. Since Entity Translation seems to be the way forward for drupal, I guess things are working as intended.
Comment #2
nwom commentedThis took me hours to figure out, but it looks like the arguments aren't being sent due to a views ajax issue.
After applying the following patch in the views module, my parent page's contextual elements were automatically passed to the subform: #2358049: Contextual filter - Provide default value - Content ID from URL not working on ajax requests
This has made the relation select module, by far the best module for adding relations. Thank you.