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

SQLSTATE[42S22]: Column not found: 1054 #3090

Closed
3ruce opened this issue Oct 16, 2019 · 6 comments · Fixed by #3107
Closed

SQLSTATE[42S22]: Column not found: 1054 #3090

3ruce opened this issue Oct 16, 2019 · 6 comments · Fixed by #3107
Labels

Comments

@3ruce
Copy link

3ruce commented Oct 16, 2019

Describe the bug
I have set the DB_PREFIX=monica_ and when trying to load /public/people/list I get SQLSTATE[42S22]: Column not found: 1054

Screenshots
https://i.imgur.com/dtFh6Mh.png

Which version are you using:
Latest version, 2.15.2

Additional context
Here's the full error message...

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'monica_monica_contacts.id' in 'field list' (SQL: select `monica_monica_contacts`.`id`, `monica_monica_contacts`.`first_name`, `monica_monica_contacts`.`middle_name`, `monica_monica_contacts`.`last_name`, `monica_monica_contacts`.`nickname`, `monica_monica_contacts`.`gender_id`, `monica_monica_contacts`.`account_id`, `monica_monica_contacts`.`created_at`, `monica_monica_contacts`.`updated_at`, `monica_monica_contacts`.`is_partial`, `monica_monica_contacts`.`is_starred`, `monica_monica_contacts`.`avatar_source`, `monica_monica_contacts`.`avatar_adorable_url`, `monica_monica_contacts`.`avatar_gravatar_url`, `monica_monica_contacts`.`avatar_default_url`, `monica_monica_contacts`.`avatar_photo_id`, `monica_monica_contacts`.`default_avatar_color` from `monica_contacts` where `monica_contacts`.`account_id` = 4 and `monica_contacts`.`account_id` is not null and `is_partial` = 0 and `is_active` = 1 and `is_dead` = 0 and `monica_contacts`.`account_id` = 4 AND (`monica_contacts`.`first_name` LIKE '%%' or `monica_contacts`.`middle_name` LIKE '%%' or `monica_contacts`.`last_name` LIKE '%%' or `monica_contacts`.`nickname` LIKE '%%' or `monica_contacts`.`description` LIKE '%%' or `monica_contacts`.`job` LIKE '%%') order by `monica_contacts`.`is_starred` desc, `first_name` desc limit 30 offset 0)

Everything else seems fine on a quick run through...

@rosnovsky
Copy link

rosnovsky commented Oct 20, 2019

Same here. I do use table prefix (maybe I shouldn't?), and my understanding is that it has been fixed in 2.15.2

@rosnovsky
Copy link

removing db prefix resolved the issue

@asbiin
Copy link
Member

asbiin commented Oct 20, 2019

There is indeed a bug!

@3ruce
Copy link
Author

3ruce commented Oct 21, 2019

Ok... thanks...

@rosnovsky
Copy link

Wow, that's quick! Thank you so much @asbiin! You guys are the best!!

@github-actions
Copy link

github-actions bot commented Jan 9, 2021

This issue has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants