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

Ensure REST routes work with Plain permalinks #1735

Open
2 tasks
mindctrl opened this issue Jan 16, 2024 · 0 comments
Open
2 tasks

Ensure REST routes work with Plain permalinks #1735

mindctrl opened this issue Jan 16, 2024 · 0 comments

Comments

@mindctrl
Copy link
Contributor

Description

In various places in Faust, we make REST API calls in such a way that assumes "pretty" permalinks are enabled. Reference: https://github.com/search?q=repo%3Awpengine%2Ffaustjs%20wp-json&type=code

If WordPress is configured for Plain permalinks, calls to /wp-json/faustwp/* do not function. In these cases, you need to make calls to /?rest_route=/faustwp/*, which we do in some places. Reference: https://github.com/search?q=repo%3Awpengine%2Ffaustjs+rest_route%3D&type=code

Fortunately most sites end up enabling pretty permalinks, and we don't see these issues often. However, it would be good for us to eliminate the problem entirely.

This issue seeks to make these consistent and use the /?rest_route variant to ensure these calls always work.

Acceptance Criteria

  • Existing calls to /wp-json/faustwp/* are updated to /?rest_route=/faustwp/*
  • The updated calls continue to work as expected!
@github-project-automation github-project-automation bot moved this to 🆕 Backlog in Headless OSS Jan 16, 2024
@moonmeister moonmeister moved this from 🆕 Backlog to 🔖 Ready for Development in Headless OSS Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 Ready for Development
Development

No branches or pull requests

1 participant