Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entries field on users breaks CP #2706

Closed
Lampone opened this issue Oct 21, 2020 · 2 comments
Closed

Entries field on users breaks CP #2706

Lampone opened this issue Oct 21, 2020 · 2 comments

Comments

@Lampone
Copy link
Contributor

Lampone commented Oct 21, 2020

Bug Description

If you add a entries field-type to users they can't login.

How to Reproduce

Add relation field of entries to a user and try to login.

Extra Detail

The following pull-request seems to be the problem: #2657

Error

Call to undefined method Statamic\Auth\File\User::locale() (View: vendor/statamic/cms/resources/views/partials/scripts.blade.php)

vendor/statamic/cms/src/Fieldtypes/Entries.php:198

    protected function augmentValue($value)

    {

        if (is_string($value)) {

            $value = Entry::find($value);

            if ($value != null && $entry = $this->field()->parent()) {

                $value = $value->in($entry->locale());

            }

        }

 

        return $value;

    }

Environment

**Statamic version:3.0.20 Pro

**PHP version:7.4.10

Install method (choose one):

  • Fresh install from statamic/statamic
@jasonvarga
Copy link
Member

Thanks!

@duncanmcclean
Copy link
Member

I can confirm this issue, here's a full Flare stack trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants