Wordpress-android: Slug isn't being set on self-hosted sites

Created on 6 Jan 2020  路  2Comments  路  Source: wordpress-mobile/WordPress-Android

Expected behavior

When I set a slug and update the post, the slug gets uploaded and saved.

Actual behavior

When I set a slug and update the post, the slugs gets cleared as soon as I leave the editor.

Steps to reproduce the behavior

  1. Open a published post on a self-hosted site
  2. Open Post settings
  3. Set a slug
  4. Click on Update
  5. Open the post again and notice the slag is empty
Tested on [device], Android [version], WPAndroid [version]

Emulator, Android 9

PostinEditing Self-hosted [Type] Bug

All 2 comments

We've investigated this issue with @ashiagr. We don't send the slug to the API (wp.editPost action -> it gets lost during the transformation from PostModel to the request here). We've also checked the documentation and it seems slug parameter isn't even supported. However, the documentation mentions string post_name: Encoded URL (slug) so we are wondering if we could use it or if it serves a different purpose.
As a next step I'd suggest checking how iOS handles slugs on self-hosted sites and we'll see where it leads us.

Tested on iOS app. Slug was properly saved on a self-hosted site. iOS app is using post_name parameter for the slug.

Screenshot 2020-01-15 at 6 20 15 PM

As discussed, we'll have to support this parameter in the requests for Android app and make changes to the wordpress-mobile/WordPress-FluxC-Android/

Was this page helpful?
0 / 5 - 0 ratings