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

fix: term_link filter #1616

Closed
wants to merge 1 commit into from
Closed

Conversation

jasonbahl
Copy link
Contributor

Description

This fixes the term_link filter callback to not modify the term link urls for GraphQL requests.

Related Issue(s):

fixes: #1613

Testing

BEFORE:

Term uri is absolute in the GraphQL Response

CleanShot 2023-10-18 at 12 51 51

AFTER:

The term uri is relative in the GraphQL response

CleanShot 2023-10-18 at 12 53 00

But in the admin UIs the term links are absolute with the alternate Faust front-end domain.

CleanShot 2023-10-18 at 12 53 20

This fixes the term_link filter callback to not modify the term link urls for GraphQL requests. 

fixes: #1613
@jasonbahl jasonbahl requested a review from a team as a code owner October 18, 2023 18:55
@changeset-bot
Copy link

changeset-bot bot commented Oct 18, 2023

⚠️ No Changeset found

Latest commit: 6929187

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

📦 Next.js Bundle Analysis for @faustwp/getting-started-example

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@mindctrl
Copy link
Contributor

These tests are failing, and it seems to be due to the # in the branch name, which translates to a URL that isn't working well with npx create-next-app.

image

Clicking that link gives me a 404: https://github.com/wpengine/faustjs/tree/fix/#1613-term_link_callback

The encoded version works: https://github.com/wpengine/faustjs/tree/fix/%231613-term_link_callback

@jasonbahl
Copy link
Contributor Author

@mindctrl do you want me to rename my branch and open a new PR?

@mindctrl
Copy link
Contributor

@jasonbahl if you don't mind. I've never seen this bug before!

@JerresonJ
Copy link

This may be similar or the same issue we are facing right now. I haven't looked at the code any further to investigate but Faust is clearly overwriting the URI in our situation too.

When querying custom taxonomies the URI is overwritten via Faust to be an absolute URL as opposed to relative. This is causing issues for us as well..

Please address the issue. thanks.

@jasonbahl jasonbahl mentioned this pull request Nov 14, 2023
@jasonbahl
Copy link
Contributor Author

closing in favor of: #1653

@jasonbahl jasonbahl closed this Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: nodeByUri return null in category page
3 participants