Wordpress-android: Stories prepublishing bottom sheet: Categories not loading

Created on 11 Mar 2021  路  8Comments  路  Source: wordpress-mobile/WordPress-Android

Expected behavior

When publishing a story, the category list should be pre-filled.

Actual behavior

In some cases the category screen is blank in the prepublishing bottom sheet from the story creator.

Originally submitted by a user, and I was able to reproduce.

Steps to reproduce the behavior

From a fresh install of the app:

  • Enter the story creator
  • Press 'publish'
  • Tap the categories option
  • Notice that no categories load

Repeating those steps keep producing the same result. Also, when visiting the categories screen from My Site > Settings > Default Category, that is also blank.

One way I've found to get it working is to attempt to publish a regular post and load the categories option from the bottom sheet. They'll show up there, and then will be available the next time you try to create a story.

cc @jd-alexander maybe you have some insight into this one?

Tested on Pixel 5, Android 11, WPAndroid 16.7 and 16.8
Prepublishing Nudges WP Stories [Type] Bug

All 8 comments

Thanks for the ping @aforcier I could take a look. I haven't looked at the categories code as yet. @zwarm let me know if you could assist with this.

Taking a look now, and I will create a PR once I find the solution. I will add you and @zwarm as a reviewer.

Also, when visiting the categories screen from My Site > Settings > Default Category, that is also blank.

@aforcier I have not been able to reproduce this as yet. Does this behavior exist once you uninstall APK from the emulator/device and reinstall and log in?

Interesting that you can't reproduce - I just tried on a fresh install/login of 16.8.1 from the Play store and it's still happening:

device-2021-03-16-105740

(WP.com account, WP.com simple site.)

Okay thanks! I will work on reproducing and resolving. I will do this resolution in another PR since the bottom sheet fix is almost complete.

I tried again to reproduce to no avail. I used Google Pixel 4 XL, Android 11 physical device and emulator and I also tried Google Pixel 3 XL. The code that fetches the categories from the API is here https://github.com/wordpress-mobile/WordPress-Android/blob/e796f20f39146eb92e75c8f274246f614b940ff2/WordPress/src/main/java/org/wordpress/android/ui/prefs/WPComSiteSettings.java#L226

Would you be able to reproduce on an emulator and tell me what the log there says?

Thanks for trying @jd-alexander - after trying this again and not reproducing initially I did some troubleshooting and found the cause. It's completely unrelated to the issue that was fixed in #14242, and only happens for sites with over 100 categories 馃槄 (and when I was testing the original issue I happened to be using a test site with 300+ categories).

I filed this here as a separate issue: https://github.com/wordpress-mobile/WordPress-Android/issues/14282

Thanks for trying @jd-alexander - after trying this again and not reproducing initially I did some troubleshooting and found the cause. It's completely unrelated to the issue that was fixed in #14242, and only happens for sites with over 100 categories 馃槄

Okay great. I am so happy that you were able to figure it out @aforcier because I was pulling out my hair wondering how I can't reproduce it 馃槅

Was this page helpful?
0 / 5 - 0 ratings