cms icon indicating copy to clipboard operation
cms copied to clipboard

Call to undefined metod User::id() when adding a new item (Page or Blueprint or whatever)

Open maxi032 opened this issue 3 years ago • 1 comments

Bug description

Hello,

I wonder if someone could help me.

I moved users to mysql and since then, I get the error Call to undefined method App\Models\User::id() whenever I try to add something.

I am using v3.3.35 I am testing locally on a domain .local I have pro mode enabled and multisite configured.

Thank you.

How to reproduce

Try to add a page, a Blueprint or a Global

Logs

No response

Environment

Statamic 3.3.35 Pro
Laravel 8.83.23
PHP 7.4.30
webographen/statamic-admin-log 1.0.6
withcandour/aardvark-seo 2.0.28

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

regex (default)

Additional details

No response

maxi032 avatar Sep 12 '22 10:09 maxi032

You need to add that function to your App\Models\User file

public function id()
{
    return $this->id;
}

ryanmitchell avatar Sep 12 '22 12:09 ryanmitchell

Hey 👋

I'm unable to reproduce this issue on the latest version of Statamic.

I'm going to close this issue now. If you're still experiencing this issue, please leave a comment and we can re-open the issue. Thanks!

duncanmcclean avatar Nov 16 '23 18:11 duncanmcclean