thedevdojo / chatter

Chatter is a Simple Laravel Forum Package
https://devdojo.com/forums
MIT License
900 stars 294 forks source link

Column not found ? #201

Closed Aecy closed 6 years ago

Aecy commented 6 years ago

Hi when i install this forum on a blank project, its work perfectly, but on my project, doesn't work..

I have this error : SQLSTATE[42S22]: Column not found: 1054 Champ '' inconnu dans order clause (SQL: select * fromchatter_discussionwherechatter_discussion.deleted_atis null order by `` desc limit 15 offset 0)

Can you help me ? (The error is probably under my eyes...)

Thanks!

terdia commented 6 years ago

Similar issues

(2/2) QueryException

SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'order clause' (SQL: select * from chatter_discussion where chatter_discussion.deleted_at is null order by `` desc limit 50 offset 0)

terdia commented 6 years ago

@aecy so I fix the issue on my side; you need to update your chatter.php add the following 'order_by' => [ 'posts' => [ 'order' => 'created_at', 'by' => 'ASC' ], 'discussions' => [ 'order' => 'last_reply_at', 'by' => 'DESC' ] ],

You may also want to check for other missing stuff like new columns added to migration files and update your database accordingly

refer to config file -https://raw.githubusercontent.com/thedevdojo/chatter/master/config/chatter.php

Aecy commented 6 years ago

Omg, i forgot php artisan config:cache I just want to die now... and the config is already correct