Comments (4)
Craft 4.9.5 and 5.1.5 are out with a fix that covers both of these issues. Thanks for reporting!
from cms.
I have also noticed that the .count() function does not return the right value for some queries.
{% set searchQuery = craft.entries({ type: availableEntryTypes}).search(query).orderBy('score').limit(5) %}
This sample code does return the limit of 5 and not the number of the entries.
from cms.
Just checked and without the orderBy('score')
the function call returns the correct number.
from cms.
@myleshyson, in your case, the EntryQuery::EVENT_BEFORE_PREPARE
used to rely on the $event->sender->orderBy
returning null
, but since 4.9, it’s returning an empty string.
@yannkost, in your case, it’s the combination of search
, limit
and orderBy('score')
.
I raised a draft PR, and we’ll discuss this internally.
from cms.
Related Issues (20)
- [4.x]: License Popup shouldn't happen if licence only needs renewing HOT 4
- [5.x]: Internal server issue when bulk editing an unpublished canonical draft without a title HOT 2
- [5.x]: Bulk edits are too easy to accidentally discard HOT 2
- [5.x]: Address filter returns incorrect "given name" if first name contains periods. HOT 1
- [5.2.0-beta.2]: `Getting unknown property: craft\fields\Dropdown::0` HOT 2
- Security bulletin for yiisoft/yii2 <2.0.50 Update dependency in Craft 4 and craft 5 HOT 1
- [5.x]: Entries with Non-Default EntryTypes Lose Content After Migration from CraftCMS 4 to CraftCMS 5 HOT 4
- [4.x]: Database backup broken on Windows HOT 2
- [5.x]: Invalid numeric value after upgrading Craft CMS from 3 to 4 and then 4 to 5. HOT 1
- [5.x]: Entry types' field layout changes aren't saved, if the only thing that changed were the positions of layout elements HOT 11
- [5.2.0-beta.3]: "Date Created" entry index column is labelled "Date Uploaded" HOT 2
- [5.x]: matrix: max entries setting does not seem to update on block deletion event when used in global set HOT 2
- [5.2.0-beta.3]: Exception thrown when creating a new entry in a Cards Matrix field nested in an inline-editable Matrix field, inside a global set HOT 2
- [5.x]: Matrix in card view doesn't show validation errors from card HOT 1
- [5.x]: eagerly() sometimes not working in matrix HOT 3
- [5.x]: Requests to `admin/login` when logged in, no longer redirect to CP HOT 1
- [5.x]: Matrix block/entry type for assets or related entries hyperlink issue HOT 1
- [4.x]: 400 Error on "save-user" controller (AJAX) HOT 2
- [4.x]: Characters limit double error messages HOT 3
- [5.x]: Not finding "memo" icon with search terms like "text" or "document" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cms.