simplemap icon indicating copy to clipboard operation
simplemap copied to clipboard

Element Query with OrderBy throwing an Exception in Craft 4

Open isteinacker opened this issue 2 years ago • 1 comments

Description

Query in Craft 4 not working using .orderBy('distance') Same query works without .orderBy and returns results

Execption thrown: Column not found: 1054 Unknown column '0' in 'order clause'

Steps to reproduce

{% set entries = craft.entries.myMapField({ location: myOtherMapField, }).orderBy('distance').all() %}

will throw exception in craft 4, query did work in Craft 3

Additional info

  • Craft version: Craft Solo 4.0.3
  • Maps version: 4.0.0
  • PHP version: 8.1.6
  • Database driver & version: MySQL 5.7.38
  • Other Plugins: Disqus, Feed Me, ImageOptimize, Minify, Phone Number, Redactor, Retour, SEOmatic

isteinacker avatar Jun 03 '22 17:06 isteinacker

@isteinacker What is the value of myOtherMapField?

Tam avatar Jul 11 '22 11:07 Tam