Extern scripts being fired unreliably
See original GitHub issueDescription
hi guys I still have some issues with a script tag changing HTML in my gatsby template, I found that for some reason if the function is fired multiple time with setInterval then it works there (it used to work in the live repo too but now for some reason it stopped working as well)
Steps to reproduce
https://codesandbox.io/s/ancient-bash-88u2s
as you can see if the setInterval is outcommented it will be shown wrong (placeholder image of some kind?) but if you remove the //
then it works again as expected
Expected result
It should show a link with hover effect and other styles etc instead of an image
Actual result
it shows only an image and not a link, in the live version when I fire the script the quality of the image will be better but doesn’t turn into a link with text (expected result)
Environment
you can see the env in the reproduction for the live site:
System:
OS: macOS 10.14.6
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.15.0 - ~/.nvm/versions/node/v11.15.0/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.12.1 - ~/.nvm/versions/node/v11.15.0/bin/npm
Languages:
Python: 2.7.16 - /usr/local/bin/python
Browsers:
Chrome: 79.0.3945.79
Safari: 13.0.4
npmPackages:
gatsby: 2.13.2 => 2.13.2
gatsby-awesome-pagination: ^0.3.4 => 0.3.4
gatsby-image: ^2.2.3 => 2.2.29
gatsby-plugin-create-client-paths: ^2.1.16 => 2.1.16
gatsby-plugin-feed: 2.3.2 => 2.3.2
gatsby-plugin-google-tagmanager: ^2.0.13 => 2.1.15
gatsby-plugin-hubspot: ^1.3.3 => 1.3.3
gatsby-plugin-lodash: ^3.0.5 => 3.1.13
gatsby-plugin-manifest: ^2.2.0 => 2.2.23
gatsby-plugin-offline: 2.2.9 => 2.2.9
gatsby-plugin-postcss: ^2.0.7 => 2.1.13
gatsby-plugin-purgecss: ^3.1.1 => 3.1.1
gatsby-plugin-react-helmet: ^3.0.12 => 3.1.13
gatsby-plugin-sass: ^2.0.11 => 2.1.20
gatsby-plugin-sharp: ^2.2.1 => 2.2.32
gatsby-source-filesystem: ^2.1.1 => 2.1.33
gatsby-source-wordpress: ^3.0.58 => 3.1.43
gatsby-transformer-sharp: ^2.2.0 => 2.2.23
npmGlobalPackages:
gatsby-cli: 2.8.5
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (3 by maintainers)
Top GitHub Comments
Hi @madalynrose, sorry being really busy lately.
First of all thanks for your answer, good to know that this issue isn’t lost in the ether 😄
I was having this issue with basically all external scripts that were supposed to create some kind of html in the DOM. I’ll look into the suggestions/guesses you were giving me, thank you!
Hello!
I’ll be closing this issue as there has been no activity for 2 months.
Thank you for using Gatsby! 💜