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

Not compatible with Model::preventAccessingMissingAttributes() #163

Closed
maciek-szn opened this issue Oct 28, 2022 · 7 comments · Fixed by #165
Closed

Not compatible with Model::preventAccessingMissingAttributes() #163

maciek-szn opened this issue Oct 28, 2022 · 7 comments · Fixed by #165
Assignees
Labels
question Further information is requested

Comments

@maciek-szn
Copy link

Laravel 9.35 introduced Model::preventAccessingMissingAttributes() option (laravel/framework#44283). However this package isn't quite compatible with this mechanism, as it sometimes returns an error: The attribute [cacheTags] either does not exist or was not retrieved for model...

@rennokki
Copy link
Member

rennokki commented Nov 9, 2022

I have opened #165, but it seems like the tests locally pass, even when I test for both false/true for strict mode.

Do you have any snippet from which the problem comes off?

@rennokki rennokki self-assigned this Nov 9, 2022
@rennokki rennokki added the question Further information is requested label Nov 9, 2022
@maciek-szn
Copy link
Author

I'll try to provide more information tomorrow. There might be Laravel Livewire involved.

@maciek-szn
Copy link
Author

It seems to me that there is a problem with passing a whole model to a Livewire component (see: Passing parameters). However the error isn't invoked on the first rendering of a Livewire component, only after refreshing it.

Should I open an issue in the Livewire repository? To be honest, I don't quite know what's going on under the hood and how the two libraries work together.

@rennokki
Copy link
Member

@maciek-szn I can test against livewire. Do you have any mockup component i can start from?

@maciek-szn
Copy link
Author

I've created a test repository.

@rennokki
Copy link
Member

rennokki commented Nov 13, 2022

@maciek-szn I was able to fix it. After 16 days. 😬

@maciek-szn
Copy link
Author

Thanks a lot!

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

Successfully merging a pull request may close this issue.

2 participants