filament-authentication icon indicating copy to clipboard operation
filament-authentication copied to clipboard

Error on new user

Open netbyte-nl opened this issue 1 year ago • 8 comments

Getting this error when pressing the "new user" button in the user screen.

Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given, called in C:\Websites\SDA2.0\SDA\vendor\filament\forms\src\Components\Select.php on line 773

When pressing "view" or "edit" in the user list this error comes: Call to a member function getResults() on null

PHP 8.3.2 10.43.0

netbyte-nl avatar Feb 14 '24 22:02 netbyte-nl

Investigating. thank you

phpsa avatar Feb 14 '24 22:02 phpsa

same error :)

mrhappyheart avatar Feb 21 '24 09:02 mrhappyheart

Have you setup spatie roles and permissions traits in your user model?

phpsa avatar Feb 21 '24 18:02 phpsa

Hi @phpsa, yes those are added:

image

netbyte-nl avatar Feb 21 '24 20:02 netbyte-nl

Based on the greyed out, looks like you have not put the use inside the class aswell?image

phpsa avatar Feb 21 '24 21:02 phpsa

I managed to fix most issues with your suggestion above, many thanks for that! Only one issue remaining and thats when trying to view or edit a role:

image

netbyte-nl avatar Feb 22 '24 07:02 netbyte-nl

I managed to fix most issues with your suggestion above, many thanks for that! Only one issue remaining and thats when trying to view or edit a role:

image

Same Issue

yukebrillianth avatar May 08 '24 17:05 yukebrillianth

For this issue, is there a repo i can look at - I am unable to replicate this issue.

phpsa avatar May 08 '24 20:05 phpsa