Error CDbCommand failed to excute the SQL statement: SQLSTATE[42S22]

More
3 months 2 weeks ago #218971 by torilee93
Limesurvey works fine when I restored to LS3. It lets me update to 5.1.3 but then when it asks to update the database I run into the error.

Please Log in to join the conversation.

More
3 months 2 weeks ago #218972 by GuernseyResearch
Before you do the upgrade do a "Data integrity" check from the Configuration menu.

My database upgrade was quick.

Please Log in to join the conversation.

More
3 months 2 weeks ago #218975 by nooblag
Hi everyone, I'm not sure if this is related, but I'm getting this error whenever I try to Export Results of a survey:

```
500: Internal Server Error
CDbCommand failed to execute the SQL statement: SQLSTATE[42803]: Grouping error: 7 ERROR: column "lime_survey_873476.id" must appear in the GROUP BY clause or be used in an aggregate function
LINE 5: ORDER BY "lime_survey_873476"."id" ASC
^
```

I've done the Data consistency check and Data redundancy check in Lime Survey admin and still this occurs.System configuration:
  • LimeSurvey version5.1.3
  • LimeSurvey buildgithub
  • Operating systemLinux s1.mals.cloud 4.15.0-153-generic #160-Ubuntu SMP Thu Jul 29 06:54:29 UTC 2021 x86_64
  • PHP version7.4.22
  • Web server nameq.mals.cloud
  • Web server softwarenginx/1.18.0
  • Web server infoHTTP/1.1
  • Database driverpgsql
  • Database driver version10.17 (Ubuntu 10.17-0ubuntu0.18.04.1)
  • Database server infoPID: 36791; Client Encoding: UTF8; Is Superuser: off; Session Authorization: limesurvey; Date Style: ISO, MDY
  • Database server version10.18 (Ubuntu 10.18-0ubuntu0.18.04.1)

 
Attachments:

Please Log in to join the conversation.

More
3 months 2 weeks ago #218984 by ollehar
Hi @nooblag, thanks for your report. Can you add it to our bug tracker at bugs.limesurvey.org, please?

Please Log in to join the conversation.

More
3 months 2 weeks ago #218986 by nooblag
Okay, for sure. Thanks for confirming it's a bug rather than a config problem.

Please Log in to join the conversation.

More
3 months 2 weeks ago #218987 by nooblag
Actually, sorry, I'm having trouble figuring out how to file a report at bugs.limesurvey.org. I don't have a login for it, so I tried the anonymous option, but I still cannot find any ability to open a new ticket...

Please Log in to join the conversation.

More
3 months 2 weeks ago #218988 by ollehar
Same user as for the forum. :) Just log out the guest account first.

Please Log in to join the conversation.

More
3 months 2 weeks ago #218989 by nooblag
Ooop. Ignore all that. It was a problem with my account.limesurvey.org login.

I managed to file a report. #17522

Thank you!

Please Log in to join the conversation.

More
3 months 2 weeks ago #218999 by torilee93
Thanks for the advice. I did a data integrity check and everything seemed fine. (Attached screenshot)
I tried the update and saw a screen that said "Checking existing limesurvey files". I clicked continue and when limesurvey asked to update the database, I ran into the error.
 
Attachments:

Please Log in to join the conversation.

More
2 months 4 weeks ago #219553 by M.Jakob
Hi @ollehar, 

I have a similar problem. The database won't migrate and I don' know why. Can you help me? 

Best, Mel
Attachments:

Please Log in to join the conversation.

More
2 months 4 weeks ago #219554 by ollehar
@M.Jakob That error is because you've tried to update multiple times, and it broke in the middle of the update. I'd suggest you restore your previous db backup and try again to update from the latest LS5 version from our download page.

Please Log in to join the conversation.

More
2 months 3 weeks ago #219589 by M.Jakob
I downloaded whole database from limesurvey before updating and i'm able to import this sql to my database to restore everything. Doesn't fix the errror though! :/

Please Log in to join the conversation.

More
2 months 2 weeks ago #219786 by TinTim
I have a similar problem, I also updated limesurvey from 3.* to 5.*, there didn't appear to be any issues, however now users are reporting similar error messages when filling out surveys.

500: Interner ServerfehlerCDbCommand konnte das SQL-Statement nicht ausführen: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'question.language' in 'where clause'

However, despite the error, the answers are stored correctly. 

Any idea how to tackle this? 

Please Log in to join the conversation.

More
2 months 2 weeks ago - 2 months 2 weeks ago #219907 by jljansen
Hi I can confirm the same problem as TinTim.
Last Friday I've updated from 3.27.18 build 210921 (or the latest 3.x) to the than latest 5.1.10+210913. I've done this through the comfort update proces.
When I submit answers to a survey in preview mode I do not get any errors but when submitting a live survey I get the following error:
Column not found: 1054 Unknown column 'question.language' in 'where clause'
Although the response is saved as a complete response.

Maybe unrelated but an update to 5.1.11 (released today) gave a database upgrade error from 473 to 475 concerning the label table (lime_labels) which was not existing in the database. Error pointed to /update/updatedb_helper.php near line 4948

Any suggestions to fix this or run some additional tests to find the cause?
Last edit: 2 months 2 weeks ago by jljansen. Reason: update exact tablename and file which gave error

Please Log in to join the conversation.

More
2 months 2 weeks ago #219910 by TinTim
As comfortupdate user I filed a ticket and the support found the solution to my problem. The error message was caused by an outdated plugin "PDFReport". Since I don't need the plugin, I disabled it which solved the problem. If you need the plugin, you need to update it, or contact the plugin's developer.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now