System Information
-
Strapi Version: 3.4.1
-
Operating System: Windows 10
-
Database: Postgres
-
Node Version: 14.5.0
-
NPM Version: 6.14.5
-
Yarn Version: 1.22.4
I am having a weird problem, for some reason a relation inside a component inside a User doesnt show up in the json response when I for example login. Here are some pics to make you understand better:
Upon login I get the user and this is the JSON I get, Skill1,2,3,4 and FACE are components which are non existent(first image)
Under the 1st image you see how they’re setup: 2nd image is 1 character, which clearly shows the Face and Skill1 components having content
3rd pic shows the user object, how the component has a relation.
4th pic shows how each character has these components and they are either not being shown or have Null as values
Final pic shows a postman get request which DOES SHOW CORRECTLY
What is going on, what am I doing wrong? Thank you for your time
Here’s the imgur album because I couldn’t post multiple attachments/links seperately:
Thank you for the help in advance! Sorry for the long post and images
The components are also not showing up if I inspect my database using the commandline
Do you use the core controller for findOne character or you created a custom one?
In my first image I just get the JSON file upon logging in (this is standard response so the frontend receives the JWT+User object), never touched that code inside Strapi’s auth.js
In the last image via postman it’s also the core controllers findOne
Edit: I cleaned up the database a bit by removing already deleted columns manually (the initial skill1,2,3,4 were older string fields that i removed and remade into components):
The Skill1,Skill2,Skill3,Skill4 and Face components you see in the imgur album of my first post are still the components that are not being added to my database
They are visible in the characters_components table I see. This just doesn’t show up in my user’s response inside the component field named “character” which has a relation with character content type (and this content type has components called skill1,2,3,4 and face etc which should show up in the User’s json response)
Please anyone?
I can’t find any github issue about this or find any hit on google related to my issue, so this is my last resort