After deploying my laravel app, I get the following 3 errors when I try to add a new menu item to a newly create menu:
1/3
PDOException in PDOConnection.php line 77:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'query_string' in 'field list'
2/3
PDOException in PDOConnection.php line 79:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'query_string' in 'field list'
3/3
QueryException in Connection.php line 770:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'query_string' in 'field list' (SQL: insert intomenu_items(title,url,icon_class,color,target,menu_id,query_string,order,updated_at,created_at) values (Blog, /blog, pencil, #000000, _self, 2, , 13, 2017-03-02 05:46:55, 2017-03-02 05:46:55))
This also happens with the menu that comes with voyager. The only difference is the data in the query.
The problem doesn't happen when I run it on my laptop, which runs on mariadb.
do you have the solutions yet?
Please update your version of Voyager to 0.11.* (I believe 0.11.4 is the current release). Also, please either re-run the migrations (specifically 2016_05_19_173453_create_menu_table.php) or manually delete the query_string field from the menu_items table.
I checked my database both in voyager and in mysql with DESCRIBE menu_items after selecting the right database and my table does not have a field called query_string.
Also, I believe I broke my local voyager installation. I couldn't find any update instructions anywhere. Besides adding 0.11.* to my composer.json, what else do I have to do?
To upgrade update to use "tcg/voyager": "0.11.*" and run composer update.
Then please remake your config/voyager.php (with our latest default) and go through our database migrations and ensure that all minor changes are in your database.
If you have any problems upgrading, please let me know.
Also if the issue still applies after upgraded, then please also let me know.
I've got the same exception. My setup is a custom docker-compose with nginx and mariadb. You should check your specific nginx config file if you have set the $-sign of the query_string variable. In my case I just forgot it.
location / {
try_files $uri $uri/ /index.php?$query_string;
}
@plugware your fix worked for me.
Thanks.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
I've got the same exception. My setup is a custom docker-compose with nginx and mariadb. You should check your specific nginx config file if you have set the $-sign of the query_string variable. In my case I just forgot it.
location / { try_files $uri $uri/ /index.php?$query_string; }