Skip to content

Conversation

@alexwpengine
Copy link
Contributor

@alexwpengine alexwpengine commented Apr 11, 2025

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

Fix duplicate links and port not taken into account.

  • Replace the URLs in the post content basesd on two settings if enabled:
  1. Enable Post and Category URL rewrites - rewrite the WordPress internal URL in the content with the Front-end URL
    1.1 If NOT enabled - use the WordPress URL
  2. Use the WordPress domain for media URLs in post content - use WordPress URL for media files (images,csv,pdf)
    2.1 If NOT enabled - use front-end url

Related Issue(s):

Provide the GitHub issue(s) number for issue tracking purposes, use the following syntax:

Testing

Sample post with images, csv/pdf, an internal link.

The expected result must be:

  1. Enable Post and Category URL rewrites - rewrite the WordPress internal URL in the content with the Front-end URL
    1.1 If NOT enabled - use the WordPress URL
  2. Use the WordPress domain for media URLs in post content - use WordPress URL for media files (images,csv,pdf)
    2.1 If NOT enabled - use front-end url

Screenshots

Documentation Changes

Dependant PRs

@alexwpengine alexwpengine requested a review from a team as a code owner April 11, 2025 11:25
@alexwpengine alexwpengine linked an issue Apr 11, 2025 that may be closed by this pull request
1 task
@changeset-bot
Copy link

changeset-bot bot commented Apr 11, 2025

🦋 Changeset detected

Latest commit: 2e29c46

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 11, 2025

📦 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! 🙌

@colinmurphy colinmurphy requested a review from whoami-pwd April 11, 2025 11:46
@colinmurphy
Copy link
Member

@alexwpengine

I will try and have a look tomorrow at why those tests are failing.

@colinmurphy
Copy link
Member

@alexwpengine @theodesp

I believe the e2e issue is related to - #2089

As per issue #2089 there is a cache issue with using npx create app for the example tutorial on Github's side. Not sure why it is only failing for this branch though.
Copy link
Member

@colinmurphy colinmurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexwpengine

I fixed the e2e bug.

Can we also add tests for what this fixes too please. Thank you for fixing this but I think it would be useful to have new tests too which act as documentation too.

Copy link
Member

@colinmurphy colinmurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexwpengine

This PR looks great 🚀 🚀 🚀

Thanks for adding in the tests and also for fixing the issues with ports ❤️

@colinmurphy
Copy link
Member

@alexwpengine

Can you also add a changeset for this too please. You should be able to add one clicking on the link above but let me know if you need any help.

@colinmurphy colinmurphy merged commit 8684b83 into canary Apr 28, 2025
16 checks passed
@colinmurphy colinmurphy deleted the 2096-faustwp---content-replacement-bug branch April 28, 2025 15:28
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.

FaustWP - Content Replacement Bug

4 participants