#54365 closed defect (bug) (duplicate)
permalink from REST API is wrong when wp_unique_post_slug is filtered
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 5.8.1 |
Component: | Permalinks | Keywords: | |
Focuses: | rest-api | Cc: |
Description
Hi,
I use a filter on wp_unique_post_slug
add_filter( 'wp_unique_post_slug', 'custom_unique_post_slug', 1, 5 );
I think there is no need for the moment to show you what I do because with PHP, it works like a charm. But, with REST API, the permalink is not updated.
For example, the snackbar "Page updated. View page" get the post_name before my filter. But if I refresh the page, everything is ok. Not a big problem, just if I click on the link "View page", I have a wrong url and I get a 404 error.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Duplicate of #54364.
Sorry, the website said me there was a database error but my ticket has been published anyway.