Open S8N02000 opened 3 months ago
+1 I'm also encountering this issue
I use a workaround till this bug gets fixed. you need to adjust the explode key for your route
public function tours(): array
{
$recordId = isset(explode('/', parse_url(url()->previous())['path'])[3]) ? explode('/', parse_url(url()->previous())['path'])[3] : null;
return [
Tour::make('example_create')
->steps(
Step::make()
->title('Example title')
->description('Example description, lorem ipsum ...'),
)
//can be removed after bug is fixed https://github.com/JibayMcs/filament-tour/issues/20
->route('/app/examples/'.$recordId.'/edit'),
];
}
What happened?
Error Encountered:
This error occurs when I add a Tour or Highlight to an
EditRecord
. The issue does not occur withListRecords
orCreateRecord
, which work as expected.How to reproduce the bug
Error Description:
When adding
HasTour
and/orHasHighlight
to theEditRecord
page and including at least oneTour::make('xxxx')
orHighlight::make('.fi-avatar')
, every page—including those without theHasTour
orHasHighlight
—generates the following error message:This issue arises despite
ListRecords
andCreateRecord
functioning correctly with similar configurations.Code Example:
Here is the code for a ListRecords page that works correctly:
Package Version
3.1
PHP Version
8.3.9
Laravel Version
11.15.0
Which operating systems does with happen with?
Linux
Notes
If the
tours()
orhighlights()
function returns an empty array, no error is generated.Thanks for your plugin !