Automattic / Automattic/babble
Initial permalink display for a shadow post type is non-pretty
- Dominant language
- PHP
- Stars
- 250
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
Scenario:
- Create a translation of a post
- Type a title
- Place the cursor in the content editor
- Watch a non-pretty permalink appear
The problem is that `Babble_Post_Public::post_type_link`, which hooks the `post_type_link` filter, is not coping with the fact that the `post_name` field has not yet been saved to the post object. The `get_sample_permalink` [hacks it's way around this issue](http://core.trac.wordpress.org/browser/tags/3.4.2/wp-admin/includes/post.php#L1023). Either we need to do the same, or we need a filter in WP core [on the output of `get_sample_permalink`](http://core.trac.wordpress.org/browser/tags/3.4.2/wp-admin/includes/post.php#L1062) which we can use instead of (or as well as) `post_type_link`.
Contributor guide
Research direction
Start with Babble_Post_Public::post_type_link and compare its behavior with the linked WordPress get_sample_permalink implementation and hook references. Reproduce the translation-title and content-editor scenario, then verify that the initial permalink displayed for the shadow post type is pretty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100