500 | Server Error
I was attempting to create a user via admin dashboard -> users -> add user but after filling the information and hit Save button I am always getting a 500 | server error. I've check the laravel log and I am getting this error .
[2019-06-04 01:24:44] local.ERROR: Call to a member function toJson() on null {"userId":1,"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function toJson() on null at /home/vagrant/code/wave_rnd/vendor/tcg/voyager/src/Models/User.php:30)
I can't fix because its a package from voyager.
Hi dogsting
this is an issue in voyager 1.2 why not upgrade to a nother version of voyager?
to fix it just add:
public function setSettingsAttribute($value) { $this->attributes['settings'] = $value ? $value->toJson() : null; }
in App\User and in /admin/bread/users/edit
Hi andrew0, where did you mean when you say "and in /admin/bread/users/edit"? I'm having the same issue, I've added to App\User and it seems to be working but I don't want it to pop up again becuase I missed something. For note, voyager was installed as a requirement for Wave via composer.
This is very common error. I have been facing it on my previous server MyColes.com.au. Now I have found the solution here. Thanks for the solution.