-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Labels
status: will not fixWon't fix as it's either intended or for some other reasonWon't fix as it's either intended or for some other reason
Description
Bug report
Required System information
- Strapi version: 4.13.6
- Database: Postgres
- Operating system:
Describe the bug
When extending a controllers update method, the method is called via rest api but not when updating content in the admin panel.
Steps to reproduce the behavior
- Create a collection in the admin panel
- Add update method to the collections controller in code
- Create content in the collection and then update some content in the admin panel
- Notice the update method does not fire
- Make a PUT rest api request to the route and notice the update method does fire
Expected behavior
Expect the update controller to run anytime content is updated. Not only via specific entry points like rest api.
Code snippets
export default factories.createCoreController('api::event.event', ({ strapi }) => ({
async update(ctx){
console.log("Does not run when saving content in the admin panel")
}
}))Additional context
Forum discussion raised by other members here https://forum.strapi.io/t/override-controller-services-not-working-in-admin-panel-v4/13997
Metadata
Metadata
Assignees
Labels
status: will not fixWon't fix as it's either intended or for some other reasonWon't fix as it's either intended or for some other reason