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: Wordpress slug compatibility #1401

Closed
svenseeberg opened this issue May 9, 2022 · 0 comments · Fixed by #1425
Closed

API: Wordpress slug compatibility #1401

svenseeberg opened this issue May 9, 2022 · 0 comments · Fixed by #1425
Assignees
Labels
💡 feature New feature or request ❗ prio: medium Should be scheduled in the forseeable future.
Milestone

Comments

@svenseeberg
Copy link
Member

svenseeberg commented May 9, 2022

Motivation

Django does not allow special characters in slugs, while WordPress does allow them. We're stripping them during the migration. It would be nice if links all over the internet and within our content to pages with special characters in their slugs do not break.

Proposed Solution

If a slug transmitted via the API does not match a translation, run the slugify method on it and then try again to match. This is the same operation we perform on slags after migrating. Alternatively, the slugify method could be run on all slugs if the compute time is not too long?

Alternatives

Old links break or need to be fixed manually over time.

Additional Context

https://issues.tuerantuer.org/browse/INFRA-161

@svenseeberg svenseeberg added 💡 feature New feature or request ❗ prio: medium Should be scheduled in the forseeable future. labels May 9, 2022
@svenseeberg svenseeberg added this to the Version 1.1 milestone May 9, 2022
svenseeberg added a commit that referenced this issue May 14, 2022
* Apply the slugify function on all API page endpoint slugs.
svenseeberg added a commit that referenced this issue May 15, 2022
* Apply the slugify function on all API page endpoint slugs.

Co-authored-by: Timo Ludwig <ludwig@integreat-app.de>
svenseeberg added a commit that referenced this issue May 15, 2022
* Apply the slugify function on all API page endpoint slugs.

Co-authored-by: Timo Ludwig <ludwig@integreat-app.de>
@svenseeberg svenseeberg self-assigned this May 15, 2022
svenseeberg added a commit that referenced this issue May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 feature New feature or request ❗ prio: medium Should be scheduled in the forseeable future.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant