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

Lifecycle hooks can't access previous values of components #20346

Closed
kmertozen opened this issue May 21, 2024 · 4 comments
Closed

Lifecycle hooks can't access previous values of components #20346

kmertozen opened this issue May 21, 2024 · 4 comments
Labels
status: will not fix Won't fix as it's either intended or for some other reason

Comments

@kmertozen
Copy link

Bug report

Required System information

  • Node.js version: 18
  • NPM version: 8.19.4
  • Strapi version: 4.8.1
  • Database: mysql

Describe the bug

I can't access the previous data of the component in collections when using lifecycle hooks

@derrickmehaffy
Copy link
Member

This is intended due to the layer at which lifecycles function and will not be addressed in v4, we have added a new layer in v5 where this is possible.

@derrickmehaffy derrickmehaffy added the status: will not fix Won't fix as it's either intended or for some other reason label May 21, 2024
@derrickmehaffy derrickmehaffy closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
@kmertozen
Copy link
Author

how can i do that in v5?

@derrickmehaffy
Copy link
Member

DocumentService Middlewares instead of lifecycles.

@derrickmehaffy
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: will not fix Won't fix as it's either intended or for some other reason
Projects
Status: Done
Development

No branches or pull requests

2 participants