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
19.08k stars 2.94k forks source link

Panel::getUrl acts weird when authenticated #13928

Open mokhosh opened 2 months ago

mokhosh commented 2 months ago

Package

filament/filament

Package Version

v3.2.99

Laravel Version

v11.20.0

Livewire Version

No response

PHP Version

8.3.9

Problem description

This code works fine when not authenticated, and acts weird when authenticated:

Filament::getPanel($id)->getUrl()

When I'm authenticated and I call this to get the URLs of multiple panels I get the same URL multiple times or sometimes random URLs.

Expected behavior

It should always return proper URLs.

Steps to reproduce

  1. create 3 panels
  2. authenticate the user
  3. try to get urls of the 3 panels in one request

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

https://github.com/mokhosh/filament-geturl-bug

Relevant log output

No response

Donate 💰 to fund this issue

Fund with Polar

mokhosh commented 2 months ago

I have created a passing test for non authenticated state, and a failing test for the authenticated state.

Just clone the reproduction repo and run pest.

ryanmortier commented 2 months ago

It seems to be getting the correct panel, it's only getUrl() that is acting up.

CleanShot 2024-08-14 at 14 01 58

Also, getLoginUrl() works correctly.

mokhosh commented 2 months ago

@ryanmortier correct. added this to reproduction repo tests.

mokhosh commented 2 months ago

Could be related https://github.com/filamentphp/filament/issues/14069