Objective
I want to create content for different locales and fetch them in a next.js app to enable i18n
Issue
When publishing the draft version of a content type after populating it with data, it throws a warning, which reads 'not found'
http: POST /content-manager/single-types/api::test.test/actions/publish?locale=es (15 ms) 404
Troubleshoot
- I've provided all the permissions for public and authenticated users
- I've added locales in i18n from the global settings
- I've enabled i18n for the content type from the builder page
Project details
{
"name": "protean-x-strapi",
"private": true,
"version": "0.1.0",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi"
},
"devDependencies": {},
"dependencies": {
"@strapi/strapi": "4.21.1",
"@strapi/plugin-users-permissions": "4.21.1",
"@strapi/plugin-i18n": "4.21.1",
"@strapi/plugin-cloud": "4.21.1",
"better-sqlite3": "8.6.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "5.3.4",
"styled-components": "5.3.3"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "2e6b5187-b712-4fe8-976c-849661638d60"
},
"engines": {
"node": ">=18.0.0 <=20.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
}
Closing
Why am I getting this error? I do not understand, what am I missing?
I've tried deleting the folders (build, node_modules, .strapi, .tmp) and then rebuilding it again, but still no luck.
What am I missing?