New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
context being ignored? #31
Comments
Very well could be an unintentional side-effect. Will have a look |
Potentially related to: #29 (comment) |
I'm having the same problem. When the entry has tags that do not have another related entry, it returns entries from other sections. Even if it is limited by section via criteria, it returns multiple inputs (from the same section) with In I'm using version 1.1.1 {% set tagIds = [] %}
{% for tag in entry.servicioTags %}
{% set tagIds = tagIds|merge([tag.id]) %}
{% endfor %}
{% set serviciosCriteria = craft.entries
.section('servicios')
.with([
'imagen',
'categoriaPerfil',
'servicioTags'
]).limit(4) %}
{% set serviciosRel = craft.similar.find({ element: entry, context: tagIds, criteria: serviciosCriteria }) %} |
Addressed in: 47aa0bd You can try it now by setting your semver in your "nystudio107/craft-similar": "dev-develop as 1.1.2”, Then do a |
@khalwat it seems to be back to how it used to work; context is limiting finding related/similar entries to the ones that have the context field in them; thanks for fixing! |
I'm grabbing some related entries like this:
Up until version 1.0.6, Similar was only returning entries that actually used 'centreArticlesTags' field. Since version 1.1.0, the plugin is returning entries from various other sections that don't use that tags field at all.
I can limit it to just the section(s) I want via criteria, but it seems to me that this change in behaviour might not be intentional? I mean I'm not sure what it now actually uses to figure out if another entry is related since it's looking through entries that don't have the tags group I specified in context? Was this change in behaviour intentional?
The text was updated successfully, but these errors were encountered: