We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When orderBy('RAND()') is used as a criteria, Craft produces the following error:
orderBy('RAND()')
Array to string conversion
Apply orderBy('RAND()') to the criteria, like so:
{% set queryCriteria = craft.entries.limit(1).orderBy('RAND()') %} {% set relatedContent = craft.similar.find({element: entry, context: entry.category, criteria: queryCriteria}) %}
That the plugin would return a randomized set of entries.
The text was updated successfully, but these errors were encountered:
Fixed an issue with using RAND() in the sort criteria (#32)
RAND()
43684b4
Signed-off-by: Andrew Welch <andrew@nystudio107.com>
Fixed in https://github.com/nystudio107/craft-similar/releases/tag/1.1.3
Sorry, something went wrong.
No branches or pull requests
Describe the bug
When
orderBy('RAND()')
is used as a criteria, Craft produces the following error:To reproduce
Apply
orderBy('RAND()')
to the criteria, like so:Expected behaviour
That the plugin would return a randomized set of entries.
Screenshots
Versions
The text was updated successfully, but these errors were encountered: