-
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
[gatsby-source-wordpress] fetchReferencedMediaItemsAndCreateNodes resolves too early #31646
Comments
Note that for repro you should always clear the cache ( |
created a sample repo (although there is not really anything to it other than setting https://github.com/rburgst/gatsby-wordpress-file-rewriting-bug |
Note that the rewriting works if I only add a single audio clip. It starts to fail with 2 audio clips. |
I am fairly certain the problem is in <audio
class="wp-audio-shortcode"
id="audio-2519-7"
preload="none"
style="width: 100%"
controls="controls"
>
<source
type="audio/mpeg"
src="https://wordpress.host/wp-content/uploads/2018/05/file1.mp3?_=7"
/>
<a href="https://wordpress.host/wp-content/uploads/2018/05/file1.mp3">
https://wordpress.host/wp-content/uploads/2018/05/file1.mp3
</a>
</audio> therefore, the graphql query that loads the media info data will produce empty results for https://wordpress.host/wp-content/uploads/2018/05/file1.mp3?_=7 but it will actually resolve the https://wordpress.host/wp-content/uploads/2018/05/file1.mp3 from the Thus, the first graphql query page data will contain many |
- in the case of either having a small `schema.perPage` setting or many many referenced resources on a single page only the first page of links were properly rewritten - now we ensure that all pages are fully processed until we resolve the promise fixes gatsbyjs#31646
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
I would really appreciate timely feedback to this important bugfix |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
any news here? this is getting quite frustrating having to wait for months for a bugfix to be reviewed. |
- in the case of either having a small `schema.perPage` setting or many many referenced resources on a single page only the first page of links were properly rewritten - now we ensure that all pages are fully processed until we resolve the promise fixes #31646 Co-authored-by: Ward Peeters <[email protected]>
- in the case of either having a small `schema.perPage` setting or many many referenced resources on a single page only the first page of links were properly rewritten - now we ensure that all pages are fully processed until we resolve the promise - this is a recommit of gatsbyjs#31652 fixes gatsbyjs#31646
- in the case of either having a small `schema.perPage` setting or many many referenced resources on a single page only the first page of links were properly rewritten - now we ensure that all pages are fully processed until we resolve the promise - this is an improved recommit of gatsbyjs#31652 fixes gatsbyjs#31646
* fix(wordpress): ensure all file links are rewritten - in the case of either having a small `schema.perPage` setting or many many referenced resources on a single page only the first page of links were properly rewritten - now we ensure that all pages are fully processed until we resolve the promise - this is an improved recommit of #31652 fixes #31646 Co-authored-by: gatsbybot <[email protected]> Co-authored-by: Tyler Barnes <[email protected]>
Description
I have an ACF that contains HTML content which contains multiple audio element which is referencing a wordpress hosted audio file. The sum of all referenced media items exceeds the configured
schema.perPage
configured page size.In this case it seems that the promise for
fetchReferencedMediaItemsAndCreateNodes
resolves with only parts of the received data (IMHO the last page) rather than the combined list of media Items.This leads to the case where you have only a few of the media items urls replaced, while the others still point to the wordpress server.
Steps to reproduce
gatsby new my-wordpress-gatsby-site https://github.com/gatsbyjs/gatsby-starter-wordpress-blog
Expected result
the 3 audio files should be rewritten to
/static...
urlsActual result
The urls are not rewritten at all.
Environment
The text was updated successfully, but these errors were encountered: