mokhosh / filament-kanban

Add kanban boards to your Filament pages

Home Page:https://filamentphp.com/plugins/mokhosh-kanban

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Kanban view crashes when using Model::preventAccessingMissingAttributes()

nsrosenqvist opened this issue · comments

What happened?

I can't open the kanban board without getting an exception when the view renders if I use Model::preventAccessingMissingAttributes(). The crash occurs in resources/views/kanban-record.blade.php due to calling the blade directive @if($record->just_updated) checking if just_updated exists on the model or not.

How to reproduce the bug

Model::preventAccessingMissingAttributes() is a setting that makes sure that one can't use attributes that don't exist on a model, this of course helps prevent bugs. Call the method in your AppServiceProvider.

Package Version

2.2.0

PHP Version

8.3.2-1+ubuntu22.04.1+deb.sury.org+1

Laravel Version

10.45.1

Which operating systems does with happen with?

No response

Which browsers does with happen with?

No response

Notes

The bug is easily fixed by using isset in the @if condition rather than attempting to access the property directly.

makes sense, I'll fix it when i get back.

@mokhosh Thank you for addressing the issue so quickly! I was able to work around it by simple adding a property to the model called just_updated and setting it to false, but I really appreciate you taking a look at it right away :)

No problem buddy 🙏