Questions tagged [directus]

Questions regarding development with directus CMS. Note: questions must be programming questions.

Directus is a free and open-source database API and 'headless' CMS. Unlike traditional CMS that encompass your entire project codebase, the decoupled approach of Directus offers an API and SDKs to connect your content to

Directus is built with

Backbone.js, Underscore, Require.js, Zend DB, Slim, Handlebars, jQuery, Moment.js, Sortable.js, Noty, and SASS.

311 questions
10
votes
2 answers

Directus can't be installed on a shared hosting

I'm trying to setup Directus. I just performed a brand new install following the guidelines described in the documentation. However once I login, I have this error: "Server Error - Something is wrong with this instance’s server or database." A UI…
Yako
  • 3,405
  • 9
  • 41
  • 71
9
votes
1 answer

Directus tree view interface only works for recursive relationships

I'm trying to use the directus tree view however it keeps telling me "The tree view interface only works for recursive relationships." Not sure what I'm doing wrong and if someone can help. team_page (singleton, created tree view item and selected…
7
votes
0 answers

Directus custom endpoint permissions

I'm trying to create a custom endpoint on Directus that can only be accessed by a logged in user. Is there any way to check if the user is authenticated inside a custom endpoint? How can I check the user roles/permissions?
6
votes
0 answers

How to make a flow in directus with the following function

I have a custom (coded) hook that works like: a collection is updated is it the collection "events"? is one of the updated fields one of these: time_show_start, time_show_end, ... get all contacts from a collection who want to recieve mails send a…
Lume
  • 155
  • 11
6
votes
1 answer

Directus 9, how can I set permissions on Files?

I have an App with private messages, the messages are stored in a directus collections, each item has multiple Attachments (files). How can I restrict access to these files for other users, that are not in the Conversation? I have tried set up a…
5
votes
2 answers

Docker can't connect to Postgres RDS error: no pg_hba.conf entry for host

I'm trying to connect a local instance of Directus 9 running on Docker engine 20 on an macOS M1 to an AWS RDS Postgres 15. I'm able to connect to the RDS database ok locally with Postico, so public remote connections through the VPC are working. I'm…
user74847
  • 181
  • 1
  • 2
  • 12
5
votes
1 answer

Symmetric many-to-many relationship in Directus

I have two collections in Directus (data platform that provides many features including REST API over database records). There is option to set relationship between different collections. I set many-to-many relationship between collectionA and…
moonvader
  • 19,761
  • 18
  • 67
  • 116
5
votes
1 answer

How to create and deploy an endpoint with Directus?

I have a nooby Directus question : How to create an endpoint and attach it to my project ? I try to follow the doc in vain : Create a directus project npm init directus-project example-project SQLite / Admin / Password cd example-project; npx…
Dimitri Leurs
  • 590
  • 5
  • 19
5
votes
1 answer

Directus v9 file-type validations before upload

Is there any way to validate or limit what file-type/ extensions could be uploaded before it actually gets uploaded? I've tried using a couple of custom-hooks but they all just went through. Hooks…
5
votes
1 answer

Directus CMS multiple images field

How do you input a field in Directus that allows you to select multiple images for upload? I can see only the file field, which allows for only one file upload. I need to create a gallery for a client with a variable number of pictures on each post.
user3427112
  • 51
  • 1
  • 2
4
votes
1 answer

Change the location of node cache?

I'm trying to deploy a containerized nodejs application to AWS Lambda with Serverless. It deploys but as soon as I trigger it I'm met with [Error: EROFS: read-only file system, mkdir '/directus/.cache'], I tried creating the folder and now it's…
FRumbo
  • 41
  • 2
4
votes
0 answers

DirectUS(version:: 9.22.4) : Cannot read properties of undefined (reading 'primary')

I am getting the error below while trying to login into DirectUS. We are using Postgres SQL as a database. at runMicrotasks () at AuthenticationService.login (/src/node_modules/directus/dist/services/authentication.js:166:40) at…
One Developer
  • 99
  • 5
  • 43
  • 103
4
votes
1 answer

Is it able to sort by subfields in directus v9 Graphql Query

I am trying to sort a Graphql Query in Directus v9 by a subfield. There is a small description how to do this... but not for subfields: https://docs.directus.io/reference/query/#sort my query looks like this: query { invoices(sort:…
4
votes
1 answer

Patching an array in directus via api-call does not work

I am trying to perform an API call to patch the name and translations of an element. translations is an array with the elements name and alt_name identified with a unique id. The code: headers = CaseInsensitiveDict() headers["Accept"] =…
Aleks
  • 83
  • 4
4
votes
1 answer

Express-session deprecated req.secret; provide secret option

hi i typed (npx directus start) and this is what it showed me : express-session deprecated req.secret; provide secret option node_modules/directus/dist/middleware/session.js:29:44 15:09:53 "KEY" Environment Variable is missing. help pls
DR dre
  • 41
  • 2
1
2 3
20 21