You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My site is using the eloquent driver for asset handling. I have nested files/folders which I am trying to sort by "Size". When doing so, I get incorrect results. Here's a screenshot of what I'm seeing:
The query that I'm seeing from my instance of the debug bar looks like this:
select * from `assets_meta` where `container` = 'assets' and `folder` = 'partners' order by json_unquote(json_extract(`meta`, '$."size"')) asc limit 5 offset 0;
I have tried this on 2 other sites all using Statamic 5 with the latest version of the eloquent-driver, and all of them are getting the same kinds of results.
I also tried switching back to the file system, and when I did that, the sorting by size worked perfectly fine.
How to reproduce
Ensure that your eloquent-driver.php config file has the asset_container and assets drivers set to eloquent.
What are the odds that the size could be split out into a separate column within the eloquent-driver package?
I'd prefer not to do that as it would mean doing this for all of the meta columns, and it doesn't solve the issue when you have a numeric column in your blueprint. We need to come up with a more generalised solution.
Bug description
My site is using the eloquent driver for asset handling. I have nested files/folders which I am trying to sort by "Size". When doing so, I get incorrect results. Here's a screenshot of what I'm seeing:
The query that I'm seeing from my instance of the debug bar looks like this:
I have tried this on 2 other sites all using Statamic 5 with the latest version of the eloquent-driver, and all of them are getting the same kinds of results.
I also tried switching back to the file system, and when I did that, the sorting by size worked perfectly fine.
How to reproduce
Ensure that your
eloquent-driver.php
config file has theasset_container
andassets
drivers set toeloquent
.Logs
No response
Environment
Additional details
No response
The text was updated successfully, but these errors were encountered: