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 CPT URL Rewrites #1590

Merged
merged 11 commits into from
Jan 26, 2024
Merged

Conversation

dana-blackbean
Copy link
Contributor

@dana-blackbean dana-blackbean commented Sep 28, 2023

Tasks

  • I have signed a Contributor License Agreement (CLA) with WP Engine.
  • If a code change, I have written testing instructions that the whole team & outside contributors can understand.
  • I have written and included a comprehensive changeset to properly document the changes I've made.

Description

When the option "Enable Post and Category URL rewrites" is turned on currently there is no check for any custom post types. This feature will currently only work on the default pages & posts.

Testing

  1. Create a custom post type using ACF or similar that is public (Visible on the frontend and in the admin dashboard.)
  2. Ensure the Faust option "Enable Post and Category URL rewrites" is enabled
  3. From the canary branch, create a new post in that custom post type.
  4. Once created, inspect the "view" link in the post list. This should match the WordPress URL
    Screenshot 2024-01-26 at 8 47 49 AM
  5. Now, checkout this PR
  6. Visit the same custom post type list again, and notice the view link is now using the headless site url
    Screenshot 2024-01-26 at 8 47 40 AM

Sorry, something went wrong.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@dana-blackbean dana-blackbean requested a review from a team as a code owner September 28, 2023 17:02
@headless-platform-by-wp-engine

Currently, we do not support the creation of preview deployments based on changes coming from forked repositories.
Learn more about preview environments in our documentation.

@changeset-bot
Copy link

changeset-bot bot commented Sep 28, 2023

🦋 Changeset detected

Latest commit: 7a33ef2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@faustwp/wordpress-plugin Patch

Not sure what this means? Click here to learn what changesets are.

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

@theodesp
Copy link
Member

theodesp commented Oct 2, 2023

Hey @dana-blackbean thank you for the PR. Could you also provide a unit test for this filter?

You need to add test case to verify that the filter exists in the following file:

@dana-blackbean
Copy link
Contributor Author

@theodesp added!

@mindctrl
Copy link
Contributor

@dana-blackbean thank you for this PR and apologies for the delay. We'll get this merged soon.

@mindctrl
Copy link
Contributor

@dana-blackbean could you bring this up to date with canary? I tried but it wouldn't let me for some reason. Not sure if you're allowing edits from maintainers or if it's something else.

@dana-blackbean
Copy link
Contributor Author

@mindctrl I am also running into the same issue with merging with canary. I was able to merge with the upstream/canary. I have also checked "allowing edits from maintainers". It was never disabled so not sure why you were weren't able to make changes.

@josephfusco josephfusco added the package: faustwp Related to the companion WordPress plugin label Nov 16, 2023
@blakewilson blakewilson added the needs: reviewer response his needs the attention of a codeowner or maintainer label Jan 24, 2024
@blakewilson blakewilson self-assigned this Jan 25, 2024
@blakewilson
Copy link
Contributor

We can ignore the Next.js Bundle Analysis / analyze workflow failure. This will fail from any PR contributor outside of the GitHub team.

@mindctrl mindctrl merged commit 05cc940 into wpengine:canary Jan 26, 2024

Currently, we do not support the creation of preview deployments based on changes coming from forked repositories.
Learn more about preview environments in our documentation.

@mindctrl
Copy link
Contributor

Thank you @dana-blackbean! This will be in our next release.

@blakewilson
Copy link
Contributor

@dana-blackbean This just landed in [email protected]. Thank you for your contribution!

@dana-blackbean
Copy link
Contributor Author

@blakewilson @mindctrl Thank you both!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: reviewer response his needs the attention of a codeowner or maintainer package: faustwp Related to the companion WordPress plugin
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants