wordpress-mobile / wordpress-mobile/WordPress-Android

Error loading revisions history on new post

Open
#9,874 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Bug Posting/Editing
Dominant language
Kotlin
Stars
3.2k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
69

Description

Creating a new post from the app does start a network call to retrieve History revisions for it. The backend replies with an error since it's a new post, available only locally, and the post ID passed to the server is 0.

2019-05-16 10:44:34.968 2451-2595/org.wordpress.android E/Volley: [1069] BasicNetwork.performRequest: Unexpected response code 400 for https://public-api.wordpress.com/rest/v1.1/sites/15592836/post/0/diffs/?locale=it_IT
2019-05-16 10:44:34.971 2451-2451/org.wordpress.android E/WordPress-API: Volley error on https://public-api.wordpress.com/rest/v1.1/sites/15592836/post/0/diffs/?locale=it_IT
    com.android.volley.ServerError
        at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:179)
        at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:114)
2019-05-16 10:44:34.974 2451-2451/org.wordpress.android D/WordPress-API: Dispatching action: PostAction-FETCHED_REVISIONS
2019-05-16 10:44:34.976 2451-2456/org.wordpress.android I/art: Do full code cache collection, code=507KB, data=501KB
2019-05-16 10:44:34.976 2451-2451/org.wordpress.android E/WordPress-API: An error occurred while fetching History revisions
2019-05-16 10:44:34.978 2451-2456/org.wordpress.android I/art: Starting a blocking GC JitCodeCache
2019-05-16 10:44:34.978 2451-2456/org.wordpress.android I/art: After code cache collection, code=449KB, data=392KB
2019-05-16 10:44:35.085 2451-2590/org.wordpress.android E/Volley: [1064] BasicNetwork.performRequest: Unexpected response code 400 for https://public-api.wordpress.com/rest/v1.1/sites/15592836/post/0/diffs/?locale=it_IT
2019-05-16 10:44:35.089 2451-2451/org.wordpress.android E/WordPress-API: Volley error on https://public-api.wordpress.com/rest/v1.1/sites/15592836/post/0/diffs/?locale=it_IT
    com.android.volley.ServerError
        at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:179)
        at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:114)
2019-05-16 10:44:35.093 2451-2451/org.wordpress.android D/WordPress-API: Dispatching action: PostAction-FETCHED_REVISIONS
2019-05-16 10:44:35.096 2451-2451/org.wordpress.android E/WordPress-API: An error occurred while fetching History revisions
Tested on develop -12be9e050f2be8199de8ec04a3672a74e3984d1e

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the new-post flow that triggers the History revisions request and inspect how the post ID is passed to the WordPress API endpoint /sites/15592836/post/0/diffs/. Reproduce the issue on develop commit 12be9e050f2be8199de8ec04a3672a74e3984d1e; done means a locally created post no longer requests revisions with ID 0 while existing-post revision loading remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.