F
Filamentβ€’12mo ago
AliBabba420

Undefined variable $listLimit

i just update my composer and getting this error anyone face this error
15 Replies
LeandroFerreira
LeandroFerreiraβ€’12mo ago
Have you published Filament views?
AliBabba420
AliBabba420OPβ€’12mo ago
no i just make a resource where i want when i click on the resource the index page should be the view page of the user login so i edit the getpage function like this it works perfectly before composer update but after update this error occurs
public static function getPages(): array
{
return [
'view' => Pages\ViewClinic::route('/{record}/view'),
'edit' => Pages\EditClinicDetail::route('/{record}/clinic-detail/edit'),
'index' => Pages\ViewClinic::route('/clinic-detail/view'),
];
}
public static function getPages(): array
{
return [
'view' => Pages\ViewClinic::route('/{record}/view'),
'edit' => Pages\EditClinicDetail::route('/{record}/clinic-detail/edit'),
'index' => Pages\ViewClinic::route('/clinic-detail/view'),
];
}
and set the record using mount in view record page
Janyk
Janykβ€’12mo ago
I'm currently experiencing the same error. Did you happen to get it solved @AliBabba420?
AliBabba420
AliBabba420OPβ€’12mo ago
No Till now no
Janyk
Janykβ€’12mo ago
I just found out that it was because I had a '->listWithLineBreaks()' in my Resource
Solution
Janyk
Janykβ€’12mo ago
No description
Janyk
Janykβ€’12mo ago
After I removed that, it started to work again
AliBabba420
AliBabba420OPβ€’12mo ago
Ok πŸ‘Œ But i don't use this method
DrByte
DrByteβ€’12mo ago
Undefined variable $listLimit
$listLimit is defined in several Text components. It is accessed from those components' corresponding templates. Your error message is very short. Was there a stacktrace, or a filename or a line number? Or a Flare error page, with a share-link that you could share here? Leandro asked about published templates because if you've cloned or made a component template that's using that variable, then you'll need to find out where and why that component template is looking for that variable. Also, what version of Filament did you upgrade "From" when you ran composer update? ie: what did you have "before", when this error wasn't appearing? That information will help determine whether there's a bug, and where it is.
AliBabba420
AliBabba420OPβ€’12mo ago
I just upgrade to v3. 1 new version with sub navigation But in v3 it work perfectly fine
DrByte
DrByteβ€’12mo ago
Okay, I'm trying to find out what exactly is causing the problem. It would be easier to investigate if you were able to specify whether it was 3.0.71, or 3.0.95 or 3.0.103, etc that you were using before upgrading to "3.1" (3.1.18 is latest as of today)
AliBabba420
AliBabba420OPβ€’12mo ago
Ok so i was trying to add a view page like a particular user view page in the index page when I gi to that resource I don't want anything else only the login user view page so u use this in v3 it work, but after upgrade to v3.1 this error appears V3. 0 The stable version
DrByte
DrByteβ€’12mo ago
Can you provide a screenshot of the entire page with the error showing? Please also provide the contents of your composer.json file.
AliBabba420
AliBabba420OPβ€’12mo ago
sry for late reply
AliBabba420
AliBabba420OPβ€’12mo ago
solved bro thanks @janyksteenbeek
Want results from more Discord servers?
Add your server