gatsby-uc / gatsby-uc/plugins

bug(gatsby-source-strapi): fetching content twice (via relationships) fails to transform to Markdown

Open
#412 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
57
Forks
37
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug

It used to work TM.
One of my websites is failing to parse specific content to Markdown. I narrowed it down to happen when this entry is selected in a relation in a DZ component (that might matter). When I do not select the entry in that manyToMany relationship, the text gets converted to Markdown again.

## To Reproduce

Steps to reproduce the behavior:

1. Have a Questions model
2. Have a FAQ component with a manyToMany to the Questions
3. Have a DZ with this FAQ Component
4. See error

The Node should contain
``` content: { medias: [], data___NODE: '6a0df7ef-2907-52e4-80dd-147f931ace96' },```
But contains:
``` content: {
data: "My content",
medias: []
},
```

## Expected behavior

Rich text should always be available in Markdown

## System Info

System:
OS: macOS 12.6
CPU: (8) arm64 Apple M2
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.15.0 - /var/folders/50/3fndm5d13gs_kr96nwxpxd9c0000gn/T/yarn--1679606202261-0.9668410895557038/node
Yarn: 1.22.19 - /var/folders/50/3fndm5d13gs_kr96nwxpxd9c0000gn/T/yarn--1679606202261-0.9668410895557038/yarn
npm: 9.5.0 - /usr/local/bin/npm
Languages:
Python: 3.10.9 - /usr/local/bin/python
Browsers:
Chrome: 111.0.5563.110
Safari: 16.0

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the Questions model, FAQ manyToMany relationship, and DZ component described in the report. Trace the Gatsby source plugin's relationship fetching and rich-text-to-Markdown transformation, comparing output when the related entry is selected or omitted. Done means related content remains available in Markdown and the node has the expected data___NODE shape.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, content
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.