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

API: slugify page slugs, fixes #1401 #1425

Merged
merged 1 commit into from
May 15, 2022
Merged

Conversation

svenseeberg
Copy link
Member

Short description

Apply the slugify function on all API page endpoint slugs. This should make all calls to children endpoints compatible with old WordPress slugs. This should do no harm (except of some compute time), as we only have slugs in our database that were cleaned by the slugify function.

Proposed changes

Use the slugify function to clean page translation slugs in API requests.

Resolved issues

Fixes: #1401

@svenseeberg svenseeberg requested a review from a team as a code owner May 14, 2022 15:09
@svenseeberg
Copy link
Member Author

... tests proved this wrong. I'll take another look ;-)

@codeclimate
Copy link

codeclimate bot commented May 15, 2022

Code Climate has analyzed commit a870052 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 73.5% (0.0% change).

View more on Code Climate.

* Apply the slugify function on all API page endpoint slugs.

Co-authored-by: Timo Ludwig <ludwig@integreat-app.de>
Copy link
Member

@timobrembeck timobrembeck left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@svenseeberg svenseeberg merged commit 80a90ed into develop May 15, 2022
@svenseeberg svenseeberg deleted the feature/api-page-slugify branch May 15, 2022 21:11
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.

API: Wordpress slug compatibility
2 participants