Wordpress-ios: Auto save doesn't work as expected for Jetpack sites Blocked by: Automattic/wp-calypso#20265

Created on 13 May 2019  路  9Comments  路  Source: wordpress-mobile/WordPress-iOS

This issue came up in code review for the implementation of Auto save published post upon preview and show preview url and will be visible in 12.5
We assume that something is not working correctly with the autosave endpoint for Jetpack sites. (possibly related to: https://github.com/Automattic/wp-calypso/issues/20265)
Per @aerych's comment:

This time round when testing I included a self-hosted site connected via Jetpack. Previewing drafts seemed to work correctly but when previewing changes to an already published post the changes were not appearing for me in the preview. Not sure if this is a case were we need to include a force=wpcom parameter to query the cache site or if its just a limitation with this sort of site and we'd want to show the "no preview available" screen

Expected behavior

When editing a published post and then choosing to preview it, the preview should show the post with the latest changes.

Actual behavior

For Jetpack sites, the post preview doesn't show the latest changes.

Steps to reproduce the behavior

  1. Open a published post
  2. Make changes
  3. Tap preview
  4. See the post as published without changes
Tested on [device], iOS [version], WPiOS [version]

SImulator iPhone Xs 12.2 and device iPhone 7 12.2

Jetpack PostinEditing Previews [Pri] High [Type] Bug

All 9 comments

I tested 3 sites using WP Internal 12.4.0.20190506 on iPhone 6S iOS 12.2:

  • WP 5.2 Jetpack 7.3.0 architectural-worm.jurassic.ninja
  • WP 5.1.1 Jetpack 7.2.1 serious-snake.jurassic.ninja
  • WP 5.2 Self-hosted open-bear.jurassic.ninja

And I was able to successfully preview changes made to published posts in all three sites with both the Aztec editor and the block editor, however, the preview looks different depending on whether or not an update has been made to the post. (4m46s)

| Preview before making a change | Preview after making a change |
|:---:|:-----:|
| preview-before-update | preview-after-update |

Possibly related: https://github.com/WordPress/gutenberg/issues/13232

@designsimply , the Preview after making a change in your screen shot is a local preview created on the client. We are moving away from generating local preview as you can see here: https://github.com/wordpress-mobile/WordPress-iOS/issues/9282

Also, I think you might have tested this before I merged my PR. I think if you pull the latest develop and try again you should see a "remote preview"

I tested with 12.4 beta, which definitely wouldn't have had your changes, which means I should be able to see the bug correct? (I believe what this tells us that it may be a bit tricky to replicate this bug and we should pay careful attention to the testing steps.)

It shouldn't show the bug in 12.4 since we are not yet attempting to generate a remote preview there.
Your comments make me realize that I should have mentioned more clearly that this will become a production issue in 12.5

Issue should be solved by the core patch. If so, will close after testing

I took a look at this issue today and it looks like it might be resolved. See the attached demo.
Screen Recording 2020-10-06 at 3 56 35 PM 2020-10-06 22_07_23
What do you think?

I agree, @aerych

Closing as fixed :) Thanks @yaelirub!

Reopening.

While testing another issue I discovered I could no longer preview published posts on Jetpack test site. This was absolutely baffling. Various attempts to debug and reset the site's Jetpack connection were fruitless and it wasn't until I remembered having connected Jetpack _via the app_ that I realized what had happened. As part of connecting and configuring Jetpack in the app I had been prompted to log in to the site in an in-app browser, so I was authenticated to the site when I recorded the demo. Today, with yesterday's auth cookie expired, I can see that previews are not working. :(

Additionally, while testing in calypso in a browser I see that I'm prompted to log in to my site before editing a post, so this is something that is still not sorted out on the web (tho if SSO is enabled on the web the experience is somewhat better).

Ugh.

Was this page helpful?
0 / 5 - 0 ratings