Skip to content
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

Element Query with OrderBy throwing an Exception in Craft 4 #346

Open
isteinacker opened this issue Jun 3, 2022 · 1 comment
Open

Element Query with OrderBy throwing an Exception in Craft 4 #346

isteinacker opened this issue Jun 3, 2022 · 1 comment
Labels

Comments

@isteinacker
Copy link

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
@Tam Tam added the Craft 4 label Jul 11, 2022
@Tam
Copy link
Member

Tam commented Jul 11, 2022

@isteinacker What is the value of myOtherMapField?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants