Questions tagged [strapi]

Strapi is an open-source Node.js headless CMS built on top of Koa. It's frontend-agnostic and claims to not be an MVC framework. It auto-generate RESTful endpoints and has support for GraphQL and WebSockets.

2734 questions
9
votes
1 answer

Strapi delete files related to an entry

I have implemented the functionality to upload files related to an entry. For example I have a collection type Articles, which has the field photos. When uploading a file, I can specify the collection, the entry of the collection and the filed to…
Jonas
  • 7,089
  • 15
  • 49
  • 110
9
votes
2 answers

Strapi Roles and Permission plugin doesnt exist in side bar?

I setted up Strapi through NPX and ran npx create-strapi-app my-project --quickstart I am using strapi and here is my side bar Normally i expected it to be like the following: I dont know why but I cannot access Roles & Permission tab as it is…
cs guy
  • 926
  • 2
  • 13
  • 33
9
votes
1 answer

Best way for internationalization with Gatsby and Strapi

In my company, we are building a static website using Gatsby framework and the Strapi headless CMS. My question is how to deal with i18n? First, I know that is a difficult question and there is not one answer, but different answers depending of the…
juliensl
  • 111
  • 1
  • 5
9
votes
5 answers

How to solve CORS Policy problem in Strapi production build?

Does anyone now how to fix CORS errors for the Strapi backend? I am getting a similar message like the one below. I replaced my domain with example.com : Access to fetch at…
baluthebear
  • 139
  • 1
  • 1
  • 6
9
votes
2 answers

Recommended way to use GraphQL in Next.js app

In my apps, I am using following NPM modules to play with Strapi, GraphQL and Next.js: react-apollo next-apollo graphql gql recompose In the next step, I am creating Apollo config file, example below: import { HttpLink } from…
Mario Boss
  • 1,784
  • 3
  • 20
  • 43
9
votes
6 answers

Strapi CMS: Fetch Nested Content

I am using Strapi CMS and struggling with fetching the nested/deep content’s data. E.g.: Let’s say, I have below content types created and relations are defined. Person: Name, Age Address: City, Country Contact: Code, Number Person has one…
Ishwar Patil
  • 1,671
  • 3
  • 11
  • 19
9
votes
8 answers

Debugging strapi in Visual Studio Code

I'm trying to debug my strapi project (3.0.0 beta 16.6) in VS Code. My launch.json: { "type": "node", "request": "attach", "name": "Attach to strapi", "port": 9229 } My package.json: "scripts": { "debug": "node --inspect=127.0.0.1:9229…
alxnkt
  • 253
  • 1
  • 5
  • 11
8
votes
1 answer

GraphQL - retrieves only maximum 10 items from Strapi

I am using React with Strapi and GrapqQL in order to retreive my data from Strapi. Seems that my query retrieves only maximum 10 items. The API is changed with this new version and I am not allowed to use first:100 in the query. This link 1 is…
user17901809
8
votes
1 answer

why Strapi dont fetch relationship in retrived data?

I created an API using strapi, and everything work fine until now. A have an "Event" and a "Stand" collection, I set up things in order to have multiple stands in event. I use Insomnia to try the API and fetch the data, and when I fetch the…
Unknow
  • 178
  • 2
  • 2
  • 12
8
votes
5 answers

Strapi v4 sanitizeEntity

I'm trying out the new strapi v4 right now (4.0.0) community edition. I've got a custom controller which queries for the current user and (in the future) fetches related objects. When I did this with strapi v3 I used the built-in sanititzeEntitiy -…
8
votes
5 answers

How to get random records from Strapi content API

I have records in strapi. I am using strapi content API. In my front-end, I need to display only 2 records randomly. For limiting, I have used limit query from content API. But random fetching what keyword I need to use. The official documentation…
Parthiban
  • 143
  • 2
  • 8
8
votes
2 answers

Rich content in Strapi rendering with no space between paragraphs

I'm using markdown-it with nuxt to render my article content (rich text) to html from strapi. The text renders but the spacing between paragraphs is not included. I can use
tag on rich text editor on strapi to create line breaks but shouldn't…
Marvin
  • 103
  • 1
  • 8
8
votes
4 answers

Upload Image/File to Strapi (Flutter Web)

I'm trying to upload an image to Strapi through Flutter Web. I'm aware (from this link) that I need to use FormData to do so. I've researched on many ways to do this and I stumble across Dio and of course Http. Both solutions gave me…
8
votes
3 answers

How to fix the error "The target polymorphic type "components_COMPNENT_NAME is not one of the defined target types"

I successfully updated the component using the PUT command, and after that Strapi threw the error: Error: The target polymorphic type "components_COMPONENT_NAME" is not one of the defined target types The command I used to update the Strapi…
Oksana B
  • 358
  • 1
  • 3
  • 17
8
votes
3 answers

VS Code: Starting inspector on 127.0.0.1:9229 failed: address already in use

So far, I have used "processId": {command: PickProcess} ", maybe it's not the best method, but it always worked." Unfortunately, this method has not worked for a few days. (Please see attachment) In the console I get "Starting inspector on…
Benjamin Reeves
  • 553
  • 3
  • 6
  • 19