AxeWP / wp-graphql-rank-math

Add GraphQL support for RankMath SEO
GNU General Public License v3.0
51 stars 7 forks source link

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

Open aryanrajput opened 2 years ago

aryanrajput commented 2 years ago

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.

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

justlevine commented 2 years ago

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.

aryanrajput commented 2 years ago

Same result.

image

image

image

justlevine commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

justlevine commented 2 years ago

@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 commented 2 years ago

@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 commented 2 years ago

support[at]axepress.dev

aryanrajput commented 2 years ago

sent.

justlevine commented 2 years ago

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:

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: https://github.com/gatsbyjs/gatsby/discussions/35331

aryanrajput commented 2 years ago

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

image

justlevine commented 2 years ago

@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.

aryanrajput commented 1 year ago

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 commented 1 year ago

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

aryanrajput commented 1 year ago

image

justlevine commented 1 year ago

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

aryanrajput commented 1 year ago

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 commented 1 year ago

Hi @justlevine ,

did you find out the issue?

justlevine commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

Blocked by #30 and #31

yeasinshakil commented 11 months ago

**

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

**

Screenshot (383)