thedevdojo / chatter

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

0.2.9 SQL ERROR #162

Closed jxlwqq closed 6 years ago

jxlwqq commented 6 years ago
SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'order clause' (SQL: select * from `chatter_post` where `chatter_discussion_id` = 22 and `chatter_post`.`deleted_at` is null order by `` desc limit 10 offset 0)

version:0.2.9

marktopper commented 6 years ago

Please provide a stacktrace

jxlwqq commented 6 years ago

laravel version: 5.5.32 upgrade from 0.2.8 to 0.2.9: stacktrace info, see the image

wx20180129-214659 2x
jxlwqq commented 6 years ago

by the way, if you want to upgrade from 0.2.8 to 0.2.9, you need to alter some tables add a 'deleted_at'

coffeebean-dev commented 6 years ago

Also having the same issue.

marktopper commented 6 years ago

The configuration has been updated and for some reason doesn't load the order_by array from the original configuration for a fallback. Please update the configuration, let me know if you still have issues after that.

marktopper commented 6 years ago

Config: https://github.com/thedevdojo/chatter/blob/master/config/chatter.php#L208

coffeebean-dev commented 6 years ago

@marktopper After updating the config I am still getting the error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'order clause' (SQL: select * fromchatter_discussionwherechatter_discussion.deleted_atis null order by `` desc limit 15 offset 0)

marktopper commented 6 years ago

@fyroc, can you please share the following result with me? Open up tinker php artisan tinker and write config('chatter'). Then I can try to see if I can remake the issue with your configuration.

jxlwqq commented 6 years ago

@marktopper it works (version 0.2.10), thanks.

coffeebean-dev commented 6 years ago

I got it to work. It was a caching issue on my local machine. Thanks.