Questions tagged [strapi]
Strapi is an open-source Node.js framework built on top of Koa for building applications. It's frontend-agnostic and claims to not be an MVC framework. It auto-generate RESTful endpoints and has support for GraphQL and WebSockets.
264
questions
0
votes
0answers
11 views
strapi uploaded file manager not showing multiple file select
I'm using stapi beta as a backend for a website i'm building, and have noticed that i have no option for multiple file selection in the admin - file upload section.
This feature seems to be in a ...
0
votes
0answers
18 views
How to deploy Strapi to an Apache cPanel
I'm setting up a Strapi install in my Apache cPanel (WHM on CentOS 7), and can't find a proper way to deploy it. I've managed to get it running, but when I try to access the dashboard (/admin), it ...
0
votes
1answer
41 views
How do I connect a Strapi (GAE) app to a MySQL (GSC) database?
EDITED: The configuration below is functioning correct now!
Package.json: dependencies (partial):
...
"knex": "latest",
"lodash": "^4.17.5",
"mysql": "^2.17.1",
"sqlite3": "^4.1....
0
votes
0answers
10 views
How can I remove the entries in “Strapi” that have a specific value?
What is the proper way to delete entries in certain cases in headless-cms Strapi? If one content type gets a specific value.
For example if the date is reached/expired. In my case I've created an ...
0
votes
0answers
12 views
How to hide some API methods in Strapi documentation
I use documentation plugin for Strapi and I need to hide some entities in API. How I can do it?
0
votes
0answers
15 views
Strapi $AND query filter returns values filtered with $OR
I'd like to filter my strapi collection and get results that match all of my criteria, so a classic $AND filtering.
Here's an example on what my documents inside my "listings" collection look like:
{...
-1
votes
1answer
23 views
my react application failed to compile strapi sdk ,
i am done writing my application but to build it is an issue , it just keep giving me this error
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this ...
1
vote
2answers
34 views
handleSubmit not getting called
I'm working on an app that uses strapi as the backenbd and react as the front
I'm using react hooks to build a login form. However my form submit does not call the submit handler
import React, { ...
0
votes
0answers
29 views
How do I add an OR condition in a graphql where statement?
I cannot get a WHERE statement working with an 'OR' condition in Strapi via graphql playground.
I would like to return all results where either the 'title' OR 'content' fields contain the search_text....
0
votes
0answers
23 views
Filter news from graphql by input searchPhrase with vuejs
I get the news with Graphql from my local strapi server and display them in Vue-component "LastNews.vue". I also have a search in other component "Search.vue". It is necessary to filter news when ...
0
votes
0answers
17 views
How to integrate strapi-sdk-javascript in order to work with IE
I'm working on a nuxt (2.6.3) webapp.
It works smoothly on modern Firefox & Chrome version, but i have to make it work with IE 11, and the strapi-sdk-javascript dependency won't work :'(
I ...
0
votes
1answer
45 views
Strapi / Graphql. What am i doing wrong?
Sorry, im total amateur. I have simple api in Strapi cms with relationships around two types (Blogs and Galleries). I'm trying fetch data from api but i dont know how get data from nested array(?) ...
0
votes
0answers
32 views
StrapiJs- User authentication and user profile
1) I built profile information content type in strapijs. Added user relation to it. Profile has and belongs to one user". Like a simple social media.
2)I added couple users/profile information. ...
0
votes
1answer
32 views
How can I restrict accepted media types in the media field on Strapi
As far as I see there is only one type of media field which can hold every type of media (image, video, pdf etc.) Is there a way to restrict the media type, so that the field only accepts images and ...
0
votes
1answer
29 views
GraphQL Filter on Enum Column
Below is my GraphQL Query to Fetch Posts from Strapi backend.
Please note I am running this on my Nuxt app.
Now I want to bring only those posts which have post_status = "Publish"
post_status is a ...
-2
votes
0answers
29 views
How to write command-line code inside node.js script. For example: console('strapi start');
I've set strapi on my server and connected it to mysql db. Every time when I have to use admin page I should run code from SSH than change information in db. I have phusion passenger on server running ...
0
votes
1answer
56 views
Using Images uploaded on Strapi on Nuxt front end
Below is my API data exposed from strapi.
http://myjson.com/1fgx71
I have a column post_content which is a markdown, I have uploaded image there using WYSIWYG editor. Now images uploaded has path of ...
0
votes
2answers
46 views
Strapi and Nuxt/Vue Accessing Image URL
I am currently getting below json from my strapi model. I have a featured_image column where I upload image.
Problem faced currently is I am unable to access the image url. It says no url property ...
0
votes
1answer
18 views
Is it possible to upload xlsx file through Strapi admin panel?
I'm using Strapi CMS paired with Cloudinary for file storage. I've been uploading images just fine through the admin panel but I now need to be able to upload an xlsx file through the panel. I have ...
0
votes
1answer
36 views
How to mutate data in Strapi with a site made with Gatsby?
I wanted to know if it's possible to write mutation querys in a site made with gatsby. The data I want to create in Strapi will not be used to display new information, it will just store data.
Is ...
0
votes
1answer
35 views
How to strapi + react fullstack app on one server?
I want set up a fullstack app with strapi and react. All tutorials i've seen say to deploy frontend on netlify and backend to something like heroku. Is there a posibility to deploy full app at one ...
0
votes
2answers
37 views
Cannot set date in beforeCreate hook - Strapi (beta14)
Created a news model: News.js
beforeCreate: async (model, attrs) => {
if (attrs['Date'] === null) {
model.set('Date', '2030-00-00 00:00:00+00');
}
}
When i create the post, if user didn't ...
0
votes
2answers
27 views
How to fix 'Error: Enum value' in strapi content type?
I'm creating a new content type in Strapi, and I set a duplicate enum value in a type called Promotion. first value is 'fixed discount' second value is 'percentage discount'.
this error has frozen ...
0
votes
1answer
55 views
Deploy Strapi API to Plesk
I set up strapi locally and it works fine.
Now I wanted to deploy to plesk, but I couldn't figure out how.
The Problem is, plesk asks for an explicit (JS) file to start with, if you run a node.js ...
0
votes
1answer
31 views
What is “_q” in the “ctx.query._q” for?
til today, I have never had the situation when ctx.query._q === true (in find: async (ctx) => {...}). Instead, I've always defined ctx.query, like:
I can already find almost everything I need. My ...
-1
votes
1answer
27 views
How to create a like system in strapi
I would like to create a like system.
I have got list of restaurant and that registerd users can like it.
So retrieve who liked it, and if (i'm logged in) i can see that i already like that restaurant....
0
votes
1answer
29 views
How to show images put with the editor
I have a text with a image that I put with the WYSIWYG editor. When It goes to preview the imagem is shown perfectly but when I consume the API, I get just a text with the link inside it, and it is ...
2
votes
1answer
34 views
How can i use logical operators with strapi's graphql filtering
I'm passing graphql variables like this:
variables: {
where: {
league: {
name_contains: "some league name"
},
teams: {
name_contains: "some teams name"
}
}
}
I want ...
0
votes
1answer
30 views
Strapi: how to set disabled as default a new user registered, then enable by an administrator
how can I set "disabled user" as default configuration to any new user which register on, then send to any administrator an email saying "new user!!" and the administrator could anable the new user ...
0
votes
1answer
30 views
How to add email attachment to strapi provider email nodemailer
I'm trying to send a confirmation email with attachments with strapi-provider-email-nodemailer. The plugin clearly supports attachments, but I don't know where in the strapi backend am I suppose to ...
0
votes
1answer
34 views
Request Entity Too Large when want to upload file to Strapi
I am trying to upload PDF file, 20 - 40 pages. I am getting:
413 Request Entity Too Large
Is there any way to increase max file size for upload?
0
votes
3answers
69 views
Gatsby, RSS Feeds and a Headless CMS
I am building a site using Gatsby and have a 'News' section of the site. This section is to be populated by various news articles pulled in from different RSS feeds.
However, I do not want to ...
0
votes
1answer
89 views
Bootstraping new Strapi Role Permissions
The question is about role permissions in Strapi - Open source Node.js Headless CMS
How to create new strapi role permissions relative to Authenticated or Public role? I want to create new role with ...
0
votes
0answers
19 views
Extend Strapi Social Auth Providers API for React Native
I'm trying to achieve authorization with Strapi with Facebook login in React Native. Using the FB login with fbsdk, I get the user to log in, and on success, pass the credentials to my app. The ...
1
vote
1answer
156 views
How to POST relation in Strapi
I'm trying to do a POST to the Strapi API and can't seem to figure out how to attach a 'has and belongs to many' (many to many) relationship.
I've already tried the following body's:
events: ["ID", "...
0
votes
0answers
36 views
How Can I Populate Images in Strapi from URL in MongoDB?
I have imported my json file listing products into Mongodb and created a content type in Strapi for my products. I have an array of image URL's that can only be added to my content type as json. Is ...
0
votes
2answers
54 views
Retrieving model attributes in Strapi from model lifecycle methods
Inside my models directory (models belongs to /api/post), there are Post.js and Post.settings.json. I created an attribute title in Post.settings.json, and in Post.js I have:
beforeCreate: async (...
0
votes
2answers
52 views
Superscripts and subscripts in strapi WYSIWYG markdown editor
I am using strapi cms to add content that will be feeded to mobile apps via api's. I have a content called articles and i am using WYSIWYG markdown editor provided by strapi. I want to add subscripts ...
0
votes
1answer
110 views
How can I modify “fetchAll” with certain columns?
I want to limit the result of return strapi.services.myType.fetchAll (ctx.query); by selecting certain columns (SELECT column1, column2, ... not SELECT *).
How and where can I edit "ctx.query"?
Many ...
1
vote
2answers
62 views
How do you Configure Stapi CMS to Use Custom Domain Name
The default port for strapi is 1337, and default hostname is "Localhost".
I changed the hostname in the server.json file (that's inside the development folder) to "example.com" and saved that change. ...
0
votes
0answers
41 views
What is the best practices to manipulate instance using strapi?
I'm new on strapi. Let's say I have two models, A & B. I want to PUT data into B object, but also manipulate related A object. I tried using api.services.[model], but it's pretty hassle. I dig ...
0
votes
2answers
71 views
Strapi Development mode issue
I am new to strapi and want to start it on development mode. Below are steps I have followed so far
git clone git@github.com:strapi/strapi.git
cd strapi
npm run setup
but then while generating a ...
1
vote
1answer
53 views
Attach debugger to Strapi server
How to start Strapi with --inspect=0.0.0.0:9229 parameter or any other way to attach the debugger to my server?
This is how I could manage that with alpha version but server.js has been removed since ...
0
votes
0answers
50 views
How do I deploy an Strapi CLI app on Azure
I just started fresh Strapi project on my local machine and I keep it in bitbucket repo. So I have a need to deploy it Azure in Windows environment. I have successfully deploy Postgres on free tier ...
0
votes
1answer
121 views
How do I query multiple images from an array with gatsby-image?
I have a collection of works that are available through a Strapi API endpoint. Each work has an array containing multiple images. I would like to render them using gatsby-image but I don't have any ...
0
votes
0answers
67 views
Fetching data from an API through an API, VueJS & STRAPI
I just start working to learn VueJS, Axios and working with STRAPI to consume data from restful api's.
Now I'm working on something but dont now how to achieve this. Im trying to describe my ...
1
vote
0answers
80 views
What is an installation and development workflow in Strapi-3-beta for git and docker
I looked through the blog/site/tuttorials and I still cannot find an answer.
I need to make reproducible configuration which will allow to have similar dev environment for all developers in the team. ...
0
votes
1answer
106 views
Migrating Existing, Strapi App from Using Sqlite3 to Using MongoDB
I have a local, strapi app (that I have in a git repo) that I want to migrate from using sqlite3 to using mongodb
I have done the following:
created a 2nd, temporary, strapi app that is successfully ...
0
votes
1answer
72 views
Strapi : What is the Content and API migration strategy
Strapi is a powerful tool, but I am unable to find any documentation/instructions which explain about the best practices/strategy to migrate contents from one environment to another, for example Dev ...
0
votes
2answers
53 views
Connect uploaded file with related model with Strapi
I am using Strapi, Sqlite3 and React.
I want to send a form with a file attached.
I have a Job model, which looks like this:
{
"connection": "default",
"collectionName": "jobs",
"info": {
...