Hi there, I’m trying to modify the create/update behavior of one of our services (for an Article), but for some reason Strapi is not picking up these changes.
For the simplest example, if I modify the Article’s services.ts file to immediately throw an error, Strapi shows no error in the logs or UI and does not prevent me from creating Articles in the Admin UI. This is the same for the Article service. However, if I create the content-types/article/lifecycles.ts file and modify the beforeCreate there, that does get invoked.
// src/api/article/services/article.ts
import { factories } from '@strapi/strapi'
export default factories.createCoreService('api::article.article', ({ strapi }) => ({
async create(params) {
// This never gets called
throw new Error('should break')
},
}))
Our configuration is very standard, I must be missing something rather obvious.
This topic has been created from a Discord post (1231006553373413458) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord