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

Call to undefined method preventsAccessingMissingAttributes() #495

Closed
cv-chameleon opened this issue Jan 10, 2024 · 3 comments · Fixed by #499
Closed

Call to undefined method preventsAccessingMissingAttributes() #495

cv-chameleon opened this issue Jan 10, 2024 · 3 comments · Fixed by #499

Comments

@cv-chameleon
Copy link

cv-chameleon commented Jan 10, 2024

With the latest Laravel 10.40 release, I get following error in my Layout classes:

Call to undefined method App\Nova\Flexible\Layouts\BannerLayout::preventsAccessingMissingAttributes()

It seems that the class Whitecube\NovaFlexibleContent\Layouts\Layout.php should implement this method, just like it's present on the Model classes.

/** * Determine if accessing missing attributes is disabled. * * @return bool */ public static function preventsAccessingMissingAttributes() { return static::$modelsShouldPreventAccessingMissingAttributes; }

@cv-chameleon
Copy link
Author

For people who also have this issue. In the meantime I made a class "AbstractLayout" and implemented the method "preventsAccessingMissingAttributes" there, exactly the same as in the Illuminate\Database\Eloquent\Model class. I then extended my Layout classes from this AbstractLayout class.

@wize-wiz
Copy link

@cv-chameleon Well that should not suppose to happen, we're not the only experiencing this problem, see PR here.

Are you planning to do a PR?

@mabdullahsari
Copy link
Contributor

See #499.

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

Successfully merging a pull request may close this issue.

3 participants