# v4 Beta Reproduction
I'm trying out the new v4 beta and have come across an… issue. When you have a component type in the model of a collection, the data does not show up.
To reproduce this:
1. Create a card collection with the model below
1. Create a link component with the model below
1. Enable `find` and `findOne` permission on the card collection
1. Populate the card with some information
1. Visit http://localhost:1337/api/cards
<details>
<summary>Card Collection</summary>
```json
{
"kind": "collectionType",
"collectionName": "cards",
"info": {
"singularName": "card",
"pluralName": "cards",
"displayName": "Card"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"title": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string"
},
"description": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "text"
},
"ctas": {
"type": "component",
"repeatable": true,
"pluginOptions": {
"i18n": {
"localized": true
}
},
"component": "generic.link"
}
}
}
```
</details>
<details>
<summary>Link Component</summary>
```json
{
"collectionName": "components_generic_links",
"info": {
"displayName": "Link",
"icon": "link"
},
"options": {},
"attributes": {
"children": {
"type": "string"
},
"href": {
"type": "string"
},
"target": {
"type": "enumeration",
"enum": [
"_blank",
"_self",
"_parent",
"_top"
]
}
}
}
```
</details>
### Expected behavior
I would expect to see the all of the data show up in the JSON when I visit http://localhost:1337/api/cards. However I do not see the `ctas` key in my JSON response. Here is the output:
```json
{
"data": [
{
"id": 1,
"attributes": {
"title": "Testing",
"description": "Lorem ipsum",
"createdAt": "2021-11-10T12:35:21.977Z",
"updatedAt": "2021-11-10T12:38:45.189Z",
"publishedAt": "2021-11-10T12:35:32.484Z",
"locale": "en"
}
}
],
"meta": {
"pagination": {
"page": 1,
"pageSize": 25,
"pageCount": 1,
"total": 1
}
}
}
```
# v3 Similar Issue
I have a similar problem in v3, but it's one that deals with dynamic zones. Have a look at the following models:
<details>
<summary>Member Collection</summary>
```json
{
"kind": "collectionType",
"collectionName": "members",
"info": {
"name": "Member",
"description": ""
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"slug": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string"
},
"zone": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "dynamiczone",
"components": [
"generic.cards"
]
}
}
}
```
</details>
<details>
<summary>Card Component</summary>
```json
{
"collectionName": "components_generic_cards",
"info": {
"name": "Cards",
"icon": "th-list",
"description": ""
},
"options": {},
"attributes": {
"header": {
"type": "string"
},
"cards": {
"collection": "card"
}
}
}
```
</details>
<details>
<summary>Card Collection</summary>
```json
{
"kind": "collectionType",
"collectionName": "cards",
"info": {
"name": "Card",
"description": ""
},
"options": {
"increments": true,
"timestamps": true,
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"attributes": {
"title": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "string"
},
"description": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"type": "text"
},
"ctas": {
"type": "component",
"repeatable": true,
"pluginOptions": {
"i18n": {
"localized": true
}
},
"component": "generic.link"
}
}
}
```
</details>
<details>
<summary>Link Component</summary>
```json
{
"collectionName": "components_generic_links",
"info": {
"name": "Link",
"icon": "link",
"description": ""
},
"options": {},
"attributes": {
"children": {
"type": "string",
"required": true
},
"href": {
"type": "string",
"required": true
},
"target": {
"type": "enumeration",
"enum": [
"_blank",
"_self",
"_parent",
"_top"
]
}
}
}
```
</details>
After I fill out some information in the both the card collection and member collection, then visit http://localhost:1337/members I do not see the `ctas` key below the `cards` in my JSON response. Here is the output:
```json
[
{
"id": 1,
"slug": "/member",
"locale": "en",
"published_at": "2021-11-09T21:25:51.000Z",
"created_at": "2021-11-09T19:12:22.000Z",
"updated_at": "2021-11-09T21:25:52.000Z",
"zone": [
{
"__component": "generic.cards",
"id": 5,
"header": "My Header",
"cards": [
{
"id": 3,
"title": "Testing",
"description": "Lorem ipsum",
"locale": "en",
"published_at": "2021-11-08T20:07:26.000Z",
"created_at": "2021-11-08T13:50:14.000Z",
"updated_at": "2021-11-09T23:45:39.000Z"
}
]
}
],
"localizations": []
}
]
```
### System
- Node.js version: v14.16.1
- NPM version: v6.14.12
- Strapi version: v4.0.0-beta.12 && v3.6.8
- Database: v4 (sqlite3) v3 (MySQL)
- Operating system: Mac