500 | Server Error

Solved Posted In Wave
  • dogstring 2 months ago
    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.

    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.

  • Best Answer

    (As selected by dogstring)

    andrewo0 2 months ago
    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 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

  • andrewo0 2 months ago
    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 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

  • dogstring 2 months ago
    I checked the voyager github but it says its current on 1.2.*
    
    https://docs.laravelvoyager.com/getting-started/upgrading
    
    I did upgrade thought but I still get the same error.
    
    

    I checked the voyager github but it says its current on 1.2.*

    https://docs.laravelvoyager.com/getting-started/upgrading

    I did upgrade thought but I still get the same error.

  • andrewo0 2 months ago
    have you tryed the fix?

    have you tryed the fix?

  • dogstring 1 month ago
    all done thanks :)

    all done thanks :)

  • jayb 3 weeks ago
    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.

    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.

Please login or signup to leave a response.

Login

or Sign Up

Sign Up

or Login
×
tnylea
Cheers Friend!

I'm Tony, the creator of this site. I'm trying to increase my twitter following. Want to follow me?

Follow @tnylea If not, no worries :)