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

[5.0.0-beta.10]: Asset::find()->hasAlt() fails #14640

Open
wsydney76 opened this issue Mar 21, 2024 · 1 comment
Open

[5.0.0-beta.10]: Asset::find()->hasAlt() fails #14640

wsydney76 opened this issue Mar 21, 2024 · 1 comment
Assignees
Labels

Comments

@wsydney76
Copy link

What happened?

Description

$hasNoAlt = Asset::find()
            ->site('*')
            ->folderId($folder->id)
            ->kind('image')
            ->hasAlt(false)
            ->exists();

gives Column not found: 1054 Unknown column 'assets_site.alt' in 'where clause''

Obviously there is a typo in

['assets_site.alt' => null],

Fixing this typo results in Column not found: 1054 Unknown column 'elements_sites.siteId' in 'on clause'

Craft CMS version

Craft Solo 5.0.0-beta.10

PHP version

8.2.13

Operating system and version

Linux 5.15.133.1-microsoft-standard-WSL2

Database type and version

MySQL 8.0.33

Image driver and version

No response

Installed plugins and versions

No response

@wsydney76 wsydney76 added the bug label Mar 21, 2024
@i-just i-just self-assigned this Mar 21, 2024
@i-just
Copy link
Contributor

i-just commented Mar 21, 2024

Hi, thanks for reporting! I raised a PR for this.

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