filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
15.9k stars 2.53k forks source link

Infinite redirect loop #13379

Open plakhin opened 1 week ago

plakhin commented 1 week ago

Package

filament/filament

Package Version

v3.2.92

Laravel Version

v11.11.1

Livewire Version

v3.5.1

PHP Version

PHP 8.3.8

Problem description

I'm building a panel without login and without default Dashboard page. I've removed ->login() from AdminPanelProvider and now once I remove ->pages([Pages\Dashboard::class]) from AdminPanelProvider I'm getting infinite redirect loop when trying to access the panel root url, however if I try to access any resource, e.g. /users I can access it without any issues, the issue happens only with the root / url.

In case Login is needed (->login() call exists in AdminPanelProvider), everything works fine — after successful login I'm being redirected to the first navigation menu item page even if I have Dashboard removed from AdminPanelProvider.

Expected behavior

I've expected root / url would redirect to the first navigation item page in case there's no Dashboard, same as if login is needed to access the panel.

Steps to reproduce

Install fresh Filament Panel Builder, create any Resource, remove ->login() call from AdminPanelProvider, remove ->pages([Pages\Dashboard::class]) from AdminPanelProvider. Try to open admin panel by root url, e.g. http://filament.test/.

Reproduction repository (issue will be closed if this is not valid)

https://github.com/plakhin/filament-issue

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

danharrin commented 1 week ago

No public reproduction

plakhin commented 1 week ago

No public reproduction

sorry, forgot to change repo visibility, give me few seconds please

plakhin commented 1 week ago

@danharrin, thanks for reopening!