Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Column name must be either a string or an array. Internal Server Error on Submit

  • jonwat
  • jonwat's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 10 months ago #136321 by jonwat
Using Version 2.50+ Build 160517

When I hit the submit button at the end of a survey I get this error every time. I have a slightly older version of the survey (the newer version of the survey was imported from a .lss file and then modified) that does not have this problem. I have changed very little: a few different answer options, a couple of extra questions. Any idea where I should look for a cause?

The survey data is saved, despite the error.

Thanks.
The topic has been locked.
  • jonwat
  • jonwat's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 years 10 months ago #136327 by jonwat
Answering my own question:

I think the problem was due to not having unique values in the tid column of the tokens table. When I created the new survey I copied the structure of the tokens table in the database (because the default in limesurvey for the columns in the tokens table is varchar(255 ), and this makes the overall record size too long. I'd fixed this inoriginal survey). However, when I copied the table structure I didn't copy the primary key constraint and the AUTO_INCREMENT attribute on the tid colum. So when I reimported tokens the tid values were all 0.

I was getting the same error as the administrator trying to "generate access tokens" for newly imported token data. After generating unique values into the tid column and make tid the auto-incremented primary key, I was able to generate the access tokens, and on completion of the survey everything worked as normal.

Moral of the story: when you try to take shortcuts by doing stuff in the database, it would help to do it properly.
The following user(s) said Thank You: DenisChenu
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose