-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Html content from markdown disappears on refresh #2750
Comments
Can you build a simple site reproducing this problem? This could be a dozen different things. If there's something about gatsby that's causing this, we definitely want to solve it. |
Thanks for the quick reply :) |
Your sample site works fine once I remove the html.jsx file so the default html.js is used. Generally you shouldn't override the html.js as it needs setup in a specific way — this is the default https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby/cache-dir/default-html.js Your html.jsx wasn't using most of the required props. https://www.gatsbyjs.org/docs/building-with-components/#html-component |
Apparently, I was a little too eager when stripping down the sample. Sorry about that. However, now I have removed the html.jsx file and the problem is still there (when I run |
Looks like you ran into this facebook/react#5479 Use Also, you should use the Also, please never email me to remind me to look at your issue. If an issue is ever urgent, I'm available for paid consulting but otherwise, I provide support as I have time / motivation and nagging me is a good way for that motivation to disappear. |
Thank you so much :) I am genuinely sorry about that. It was not my intention to be "nagging" you. |
Yeah, sorry about that — there was a really big pile of issues earlier :-) but just for future reference, it's bad form to email maintainers directly unless you're paying them or best friends or something. |
Just got bitten by this, is possible to show a warning or something somewhere? |
Bitten +1 |
… (comment)); disable share button; fix sections padding and font sizes.
…ly set html in a div per this stack issue: gatsbyjs/gatsby#2750
Scratch that, Gatsby's cache became invalid somehow so it wasn't rebuilding. |
It appears that the lede sometimes appears and sometimes does not when visiting the production site, and any static build. Under the devserver everything seems fine. I think that the cause for this is using dangerouslySetInnerHTML to set HTML that has nested <p> tags?!?! gatsbyjs/gatsby#2750 (comment) I've replaced the <p> tag with a <div> for the lede and will see if this fixes things at www.unlockingtheairwaves.org like it did for my local build.
When clicking on a link in my webpage to get to another page everything works, but when I reload a page or go directly to a specific page (https://www.hallingdata.no/om-oss) the html-content from markdown flashes then disappears.
This problem is not present when running
gatsby develop
.I have kind of found a workaround that I have used on this page (https://www.hallingdata.no/kontakt-takk/):
This results in the page first displaying two instances of the html-content, then after 1 second or so, only one instance is displayed. If I remove the first instance of Typography the content flashes then disappears.
Query
The text was updated successfully, but these errors were encountered: