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
6
votes
5 answers

How to set role when register a new user using strapi?

I'm try register an user and i would like to know how can i set role as Administrator. I tried user: { username: "elialber", email: "falecom@elialber.com.br", password: "123456789", role: ??? } I'm using Angular5 and just api strapi
Elialber Lopes
  • 633
  • 7
  • 18
6
votes
3 answers

Strapi: how to send confirmation email when user signup?

I want to send emails to signup user and activate it until cerntain actions are done. I don't know whether this feature is available already, or I need to implement the logic myself. With the default authentication and user models, it looks like…
chuan
  • 194
  • 2
  • 14
5
votes
6 answers

Strapi v4 too much nested data

I'm rewriting strapi v3 queries to v4 (GraphQL), and with new fields 'data' and 'attributes', I have a problem going too much deep into nested objects, an example of how data looks: user { data { id attributes { company { …
Marko B.
  • 535
  • 3
  • 8
  • 18
5
votes
3 answers

How to custom strapi Admin UI v4?

I have tried to change the HomeHeader of the Admin page, but it has no changes. I copy admin folder in node_modules/@strapi/admin/admin to my-project/admin and then I modified HomeHeader.js file as the image below: I started strapi with the command…
sanglt
  • 179
  • 2
  • 4
5
votes
1 answer

Strapi new user registration keeps getting "Email is already taken" error, no email confirmation either

I initialized a new Strapi server and with different databases and when registering a new user I keep getting the same "message": "Email is already taken" error. I used a different username and different email each time. I also couldn't get the…
reactTech
  • 73
  • 2
  • 4
5
votes
1 answer

Getting random records from strapi v4 entity service

In Strapi v3 the following code would return random records: strapi.query(table).model.query(qb => { qb.limit(count); //with limit qb.orderByRaw("RAND()") //with rand }).fetchAll() How can I achieve the same in v4?
derfred
  • 18,881
  • 3
  • 23
  • 25
5
votes
3 answers

Strapi v4 throwing cors exception

Im new to strapi and I have downloaded strapi v4 and as front-end I use vue.js. Now I created categories and I am trying to fetch those with my vue app but I’m getting a cors error. Access to XMLHttpRequest at 'http://localhost:1337/api/categories'…
Refilon
  • 3,334
  • 1
  • 27
  • 51
5
votes
3 answers

Create Strapi App, no option for mongoDB on custom installation type

When attempting to create a Strapi App which is connected to a MongoDB cluster and selecting the custom installation, all online tutorials suggest that "mongodb" should be one of the options in the dropdown list alongside "postgres", "mysql" and…
Thomas Fox
  • 521
  • 2
  • 5
  • 16
5
votes
1 answer

How to add unit testing in strapi version 4 using jest?

I'm trying to add unit testing on a brand new strapi application. The official documentation is still in progress. So, until the documentation is being ready is there a way to add jest unit testing to strapi application ? i followed the approach in…
5
votes
1 answer

In Strapi 4. How to change Wysiwyg editor to CKEditor?

After the release of Strapi 4, the CKEditor library for Strapi is no longer supported. And when trying to follow the documentation it is also not very clear if it is with component injection or some other procedure. Strapi 4 Docs WYSIWYG editor To…
5
votes
3 answers

NextAuth.js: JWT secret breaks application

[I'm using Next.js (11.1.2) + NextAuth (4.0.0-beta.7) to signin into a Strapi API, using only Credentials provider (JWT).] Whole auth flow is "working" with this [...nextauth].js: import NextAuth from "next-auth" import CredentialsProvider from…
pedrosantanna
  • 53
  • 2
  • 7
5
votes
4 answers

no permission to see this field in strapi

I am unable to enter data to fields which I have created in user collection type in strapi. I wanted to create extra fields in user collection in strapi so I created some extra fields from builder , but when trying to enter data , the newly created…
AyushPayasi
  • 177
  • 1
  • 6
5
votes
3 answers

NextJS/Image: "url" parameter is valid but upstream response is invalid

I am trying to fetch images from Strapi into my NextJS Application, but whatever I am trying to do I am always getting the error "url" parameter is valid but upstream response is invalid" The console is stating: Failed to load resource: the…
Ibo
  • 159
  • 1
  • 7
5
votes
2 answers

Strapi Rich text content not showing correctly on Web Page

I am currently using Strapi as my CMS and NextJs/React as my frontend. I have included 1 field in my strapi as a rich content field. When I add my content in Strapi itself and see the preview, it shows the correct output with all the spacings and…
JJM50
  • 467
  • 1
  • 7
  • 20
5
votes
1 answer

How to use a uuid as default ID with postgres?

Currently in the process of migrating to to postgres after the announcement about dropping mongodb, Just noticed that the ID's are just numbers and auto-incremented. I have tried: Setting the default ID as a UUID with a lifecycle hook - No…
Sid
  • 846
  • 3
  • 12
  • 25