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

Orderby Rand() not working on Postgres #2071

Open
gijsstegehuis opened this issue Sep 20, 2024 · 2 comments
Open

Orderby Rand() not working on Postgres #2071

gijsstegehuis opened this issue Sep 20, 2024 · 2 comments

Comments

@gijsstegehuis
Copy link

Describe the bug

->orderBy('RAND()'); is hardcoded here, but in Postgres RAND() it's called RANDOM()

$query = $this->getElementsQuery()->orderBy('RAND()');

Steps to reproduce

  1. Setup Postgres backed Craft instance
  2. Visit some action that triggers actions/formie/email/preview

Form settings

  • not relevant -

Craft CMS version

Craft Pro 5.4.4

Plugin version

3.0.7

Multi-site?

No response

Additional context

No response

@engram-design
Copy link
Member

Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.7".

@gijsstegehuis
Copy link
Author

Awesome Josh!

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

No branches or pull requests

2 participants