can't use Published, Draft, Trash filters on module index

I see the buttons, they show the correct counts in the parenthesis, but when I click on them, I always see all the items. (This is also true on the users page with the Active, Disabled and Trash buttons: The counts are correct, but I always see all users in the list.) Any ideas? I'm new to Twill so sorry if I forgot something obvious.
5 Replies
ifox
ifox2y ago
Hi @Pauly this is definitely unexpected. Can you share you PHP, Laravel and database type/version?
Pauly
PaulyOP2y ago
Hi @ifox.dev, sorry for the slow response, still running into this on all my modules. Here is the version info: PHP 8.1, Laravel 9, MySQL 8.0.26 I should also note that in addition to the filters not changing what's shown in the index, I have a module which I believe should allow sorting of the index. When I try to sort, the little arrow appears and flips, but again no change to what's shown in the index. I'm not sure how the "Search" field is supposed to behave, but again, it appears to have no effect on the index items listed. Thanks for your assistance.
ifox
ifox2y ago
Hi @Pauly it seems like it could the query string being ignored by your web server, as all these features depend on it.
Pauly
PaulyOP2y ago
@ifox.dev, thanks for the response what you're saying makes sense. To test, I tried overriding the index() method on my admin controller thusly: public function index($parentModuleId = null) { $uri = \Request::getRequestUri(); $query = parse_url($uri)['query']; dd($query); } When I do this, I see any querystrings included at the end of the URL dumped out. So the querystring is being successfully passed through to my admin controller. This is the same Laravel setup I have used for other applications and never had a problem with querystrings. It seems they are just being ignored by Twill for some reason. @ifox.dev, actually let me refine my response. I checked further that the querystring is being parsed by doing: dd(\Request::all()); When I do this, I get an empty array in my admin controllers. My front-end controllers, on the other hand, do show a correctly parsed querystring. But for some reason, it is coming across as empty string in my admin controllers. As I mentioned above, the querystring is visible in the Request object when you use getRequestUri(). I'm puzzled why the parsed querystring would be missing from the Request object but only in my Twill admin controllers..... @ifox.dev, sorry, I mean empty array (not empty string) in my admin controllers. I need a little more coffee....
ifox
ifox2y ago
yeah this is really strange, haven't heard of that issue before could you possibly share a repro? any custom or package middleware you would have added on your twill routes?
Want results from more Discord servers?
Add your server