-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Craft 5 upgrade - database error - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'content.id' in 'group statement' #51
Comments
I'm confused... this plugin hasn't been ported to Craft 5 yet? |
haha my bad, I don't know what I was thinking. It has indeed been ported to Craft 5. |
I believe the plugin is still referencing a |
Yep, sure looks like it, in $query->subQuery->groupBy(['elements.id', 'content.id', 'elements_sites.id']); Try changing that to: $query->subQuery->groupBy(['elements.id', 'elements_sites.id']); and see if it works for you? |
Addressed in the above commit You can try it now by setting your semver in your "nystudio107/craft-similar": "dev-develop-v5 as 5.0.1”, Then do a Let me know how it works out for you! |
So you're saying that you tried the version of Similar in the Can you post the full text of the error rather than a screenshot, hopefully including the PHP code line numbers, etc? |
Here you go. Thanks Andrew!
|
Alright, I think I've got it. Addressed in the above commit. Do this again and it should update with the latest changes from the You can try it now by setting your semver in your "nystudio107/craft-similar": "dev-develop-v5 as 5.0.1”, Then do a Let me know how it works out for you! |
I've released version Which fixes two verified, legit bugs. If there are more issues you find after updating to that version, I can continue to work with you on them. |
Thanks Andrew. Unfortunately, we're still getting an error.
|
@alexagui please 100% verify for me that you're running the release |
Hi Andrew. Yes we tried it twice to confirm. |
Let's debug this together: |
You gave me enough info here that I figured out what is going on here. Fixed in these tagged releases: Craft 3: https://github.com/nystudio107/craft-similar/releases/tag/1.1.7 Craft 4: https://github.com/nystudio107/craft-similar/releases/tag/4.0.2 Craft 5: https://github.com/nystudio107/craft-similar/releases/tag/5.0.2 |
We good to go @alexagui ? |
We are 👍 Thanks Andrew! |
Summary
We’re upgrading a Craft Commerce site to Craft 5 and running into a databaese error.
We believe the problem is with line 203 in
vendor/nystudio107/craft-similar/src/services/Similar.php
Included snippet of template code below.
Screenshots
Versions
Similar: 4.0.1
Craft: Craft Pro 4.9.5
Commerce: 4.6.1
Database: MySQL 8.0.36
PHP: 8.3.3
Template snippet
The text was updated successfully, but these errors were encountered: