The similar by term views integration filters has some options. E.g. you can limit the vocabularies with which matches are made.
Currently, if you select a vocabulary in the filter and save the filter, the option is not saved. This is due to some errors in the way the options form is created.
This is the fix. A patch file is attached to this ticket also.
diff --git a/views/similarterms_handler_argument_node_nid.inc b/views/similarterms_handler_argument_node_nid.inc
index 2c1da8f..d525369 100755
--- a/views/similarterms_handler_argument_node_nid.inc
+++ b/views/similarterms_handler_argument_node_nid.inc
@@ -51,19 +51,21 @@ class similarterms_handler_argument_node_nid extends views_handler_argument_nume
'#title' => t('Similarity by Terms'),
'#collapsible' => FALSE,
);
- $form['similarterms']['vocabularies'] = array(
+ $form['vocabularies'] = array(
'#type' => 'checkboxes',
'#title' => t('Limit similarity to terms within these vocabularies'),
'#description' => t('Choosing any vocabularies here will limit the terms used to calculate similarity. It is usually best NOT to limit the terms, but in some cases this is necessary. Leave all checkboxes unselected to not limit terms.'),
'#options' => $vocabularies,
'#default_value' => empty($this->options['vocabularies']) ? array() : $this->options['vocabularies'],
+ '#fieldset' => 'similarterms'
);
- $form['similarterms']['include_args'] = array(
+ $form['include_args'] = array(
'#type' => 'checkbox',
'#title' => t('Include argument node(s) in results'),
'#description' => t('If selected, the node(s) passed as the argument will be included in the view results.'),
'#default_value' => !empty($this->options['include_args']),
+ '#fieldset' => 'similarterms'
);
}
Comments
Comment #1
merilainen commentedThe patch works well
Comment #2
attheshow commentedPatch works for me too.
Comment #3
hvalentim commentedIt does seem to work. Thanks a lot.
Comment #4
KHofmeyer commentedWorks for me as well.
Comment #5
asb commentedFour reports that the patch works as advertised. This is ready to commit, so, maintainers, please…
Comment #6
rliThanks, this patch works for me. I think this is a critical issue. Please commit
Comment #7
rliComment #8
thomas.feichter commentedWorks also for me.
Comment #9
philippejadin commentedWorks for me as well.
Would be really great to commit the patch to latest release. Because when you have a lot of taxonomies, if you cannot choose (save) which one is used for the comparison, the quality of the similarity often end up being very low.
Comment #10
criznach commentedRTBC++
Comment #11
philippejadin commentedrtbc +++ :-)
tested on production with a lot of nodes, perfect outcome.
Comment #12
nevergonertbc++
Comment #13
thijsvdanker commentedAnother RTBC!
Comment #14
exog3n commentedthank you for the patch!
Comment #15
MO-2 commentedPatch in original post works great!
Comment #16
doublejosh commentedWorks for me. +1
Comment #17
13rac1 commentedRTBC! Please commit.
Comment #18
vasyok commentedPatch work fine in 7.x-2.x-dev version, but it is not work in 7.x-2.3
Comment #19
plazik commentedWorks for me in 7.x-2.3.
Comment #20
mpa3b commentedThanks!
Comment #21
asb commentedPatch applies cleanly:
Also, patch works as advertised. Please commit!
Comment #22
david_garcia commentedWorks +1
Comment #23
luksakThis patch is marked RTBC since almost two years. Can we get this committed?
Comment #24
rodrigoaguileraThe module is unmantained, someone must take over mantainance
Comment #25
hanskuiters commentedPatch works fine.
Comment #26
lazly commentedIt's working fine, thanks! :)
Comment #27
takim commentedPatch has been added in branch.
Comment #28
takim commented