Skip to content
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

Redirect Attachments breaks gatsby-source-wordpress: GraphQL request was redirected to / #15

Open
1 of 3 tasks
aryanrajput opened this issue Nov 1, 2022 · 23 comments
Open
1 of 3 tasks
Labels
status: hold ⚠️ Work on this is on hold due to another issue/ PR type: bug 🐛 Something isn't working workaround provided 🩹 A temporary workaround has been provided.

Comments

@aryanrajput
Copy link

Description

I'm able to get seo field on WordPress GraphQL IDE. But on gatsby develop giving this error.

Steps to reproduce

Getting this Error: GraphQL request was redirected to /

Additional Context

image

image

Plugin Version

WPGraphQL for Rank Math SEO Version 0.0.5

WordPress Version

6.0.3

WPGraphQL Version

1.12.0

RankMath SEO Version

1.0.100.1

Additional enviornmental details

"react": "^18.1.0",
"gatsby": "^4.19.2",
"gatsby-source-wordpress": "^6.24.0",

{
resolve: gatsby-source-wordpress,
options: {
schema: {
timeout: 100000,
},
url: https://cliniexpertsresearch.net/graphql,
}
},

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have disabled ALL plugins except for RankMath SEO, WPGraphQL, and WPGraphQL for Rank Math

  • Yes
  • My issue is with a specific 3rd-party plugin.
@justlevine
Copy link
Member

justlevine commented Nov 1, 2022

Hey @aryanrajput, I need this part of the bug report 😇:

Please confirm that you have disabled ALL plugins except for RankMath SEO, WPGraphQL, and WPGraphQL for Rank Math

All those other plugins in the screenshot need to be disabled so we can confirm whether the issue is actually with this plugin and we have the power to fix/address it.

If the issue goes away, when disabling all other plugins/custom php, enable them one by one until the error returns, and we've found the culprit. It could be an issue with that plugin/custom code specifically or a conflict between that one and WPGraphQL for RankMath, but either way we have a good starting point for replicating and resolving the issue.

@justlevine justlevine added status: needs info 🔎 Needs more info before action can be taken type: bug 🐛 Something isn't working labels Nov 1, 2022
@aryanrajput
Copy link
Author

Same result.

image

image

image

@justlevine
Copy link
Member

Thanks for the followup.

🤔

Running gatsby develop is working fine for me... When and we're not actually handling image meta yet in v0.0.5, so I'm not sure what could be causing this.

If you disable WPGraphQL for Rank Math, does the problem go away?, Similarly does the issue persist if Gatsby is building from a clean WP install instead of your existing site?

@aryanrajput
Copy link
Author

Yes problem will go away after disable WPGraphQL-for-Rank-Math plugin.

And I have tested same WP on new Gatsby project. as expected result is same.

image

@aryanrajput
Copy link
Author

@justlevine No Response get from your end. Please R&D and let me know the exact reason.

@justlevine
Copy link
Member

@aryanrajput i've tried and tried to replicate using Gatsby Starter WordPress Homepage, but Gatsby is building fine for me.

image
image

While investigating, I did find some issues with seo.fullHead and seo.openGraph in certain environments, and pushed a new release, but I'm doubtful it will help your issue.

Would you be able to create a test replication on CodeSandbox, and share here?

@aryanrajput
Copy link
Author

aryanrajput commented Nov 8, 2022

@justlevine First of all, Thanks you for your efforts.

I want to say that,
Can you please provide your email so that I can share my graphQL endpoint. that you can use it in your project to check whether it is Gatsby end problem or WordPress end.

@justlevine
Copy link
Member

support[at]axepress.dev

@aryanrajput
Copy link
Author

sent.

@justlevine
Copy link
Member

Hey @aryanrajput
I was able to replicate the error on your endpoint. This is indeed an issue with your WordPress data.

Your endpoint started timing out before I could look too deep but most likely:

  • You have custom code or a plugin which changes how redirects are handled.
  • You have a corrupt image in your Media Library.
  • One of your posts has a Featured Image that has since been deleted from the Media Library.

A confluence of all three might be part of Rank Math's Redirections module. If you disable the Redirections module in Rank Math, does gatsby build?

cc: gatsbyjs/gatsby#35331

@aryanrajput
Copy link
Author

Thanks @justlevine . problem solved.
Just disable this option and everything solved.

image

@justlevine
Copy link
Member

justlevine commented Nov 14, 2022

@aryanrajput great sleuthing!

If you don't mind I'm going to leave this ticket open until I can figure out a solve that lets us support this Rank Math setting. Redirections are scheduled for my next sprint, so hopefully this will come sooner than later.

@justlevine justlevine reopened this Nov 14, 2022
@justlevine justlevine added workaround provided 🩹 A temporary workaround has been provided. status: confirmed 📍 The issue has been confirmed and reproduced. and removed status: needs info 🔎 Needs more info before action can be taken labels Nov 14, 2022
@aryanrajput
Copy link
Author

Hi @justlevine ,

Showing duplicate data in SEO fullHead field.

image

First item field showing normal but as index increase fullHead field data also increase accordingly.

@justlevine
Copy link
Member

@aryanrajput can you confirm you're running the latest version? I thought I squashed that in v0.0.6 🤔

@aryanrajput
Copy link
Author

image

@justlevine
Copy link
Member

Please upgrade to the latest version 0.0.7 and confirm if the issue goes away

@aryanrajput
Copy link
Author

Hi @justlevine currently getting this result.

image

I don't think the issue has been solved. you can see this IDE screenshot.

image

image

Sometimes on WP-GraphQL IDE . getting this error.
image

@aryanrajput
Copy link
Author

Hi @justlevine ,

did you find out the issue?

@justlevine justlevine mentioned this issue Jan 7, 2023
5 tasks
@justlevine
Copy link
Member

@aryanrajput #22 (live on /develop) should resolve the issue with duplicate/old meta tags. Feel free to test and confirm.

The errors in your second screenshot are caused by an old version of WPGraphQL for Woocommerce being incompatible with WPGraphQL v1.13.x , upgrading that plugin should solve that.

@aryanrajput
Copy link
Author

@justlevine Thank you for your support.

Could you please give us a short of idea When are you planning to release the new version with this bug fix, so that we can plan accordingly.

@justlevine
Copy link
Member

V0.0.8 should have solved everything you mentioned except for the 'redirect attachments' issue.

It's hard to put an ETA on work I'm doing in my free-time and this project doesn't currently have any sponsors, but I hope to sort out the image redirect issue (and other image-related SEO data) as soon as I can.

@justlevine
Copy link
Member

Blocked by #30 and #31

@justlevine justlevine changed the title Error: GraphQL request was redirected to / Redirect Attachments breaks gatsby-source-wordpress: GraphQL request was redirected to / May 13, 2023
@justlevine justlevine added status: hold ⚠️ Work on this is on hold due to another issue/ PR and removed status: confirmed 📍 The issue has been confirmed and reproduced. labels May 13, 2023
@justlevine justlevine pinned this issue May 20, 2023
@yeasinshakil
Copy link

**

Just disable Rank Math general setting Redirects attachment. 404 error or redirects attachment error will gone.

**

Screenshot (383)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: hold ⚠️ Work on this is on hold due to another issue/ PR type: bug 🐛 Something isn't working workaround provided 🩹 A temporary workaround has been provided.
Projects
None yet
Development

No branches or pull requests

3 participants