You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📣 Part of #12240. Changes should target issue/12240-master-branch.
In #12466, we found that locally published posts are not set to be automatically uploaded. We added auto-uploading in #12252 but we seemed to have missed this case.
Steps to reproduce
Use issue/12240-master-branch
Go offline.
Create a post and add an image.
Tap on Publish in the top right and publish the post.
Notice that the Post List says “Upload failed” instead of “Post will be published...”.
Investigation
Described from the comment #12466 (comment), the shouldAttemptAutoUpload returns false. This is why the action is .autoSave instead of .upload. The shouldAttemptAutoUpload is initially set to true here:
However, something in our code changed the status to .failed which resulted in the hash changing, and ultimately the shouldAttemptAutoUpload return value.
// The list of the properties we're taking into account here broadly mirrors: https://github.com/wordpress-mobile/WordPress-FluxC-Android/blob/f9e7fbae2479ad71bd2d1c7039f6f2bbbcc9444d/fluxc/src/main/java/org/wordpress/android/fluxc/model/PostModel.java#L443-L473
// Note that some of the properties aren't found on `AbstractPost`, but rather on `Post` and/or `Page` —
// that's the purpose of the `-additionalContentHashes` extension point.
This is a case we probably did not find during #12252. Though it's worth investigating if this worked in #12252 and we somehow changed the location of when we set shouldAttemptUpload to true.
The text was updated successfully, but these errors were encountered:
📣 Part of #12240. Changes should target
issue/12240-master-branch
.In #12466, we found that locally published posts are not set to be automatically uploaded. We added auto-uploading in #12252 but we seemed to have missed this case.
Steps to reproduce
issue/12240-master-branch
Notice that the Post List says “Upload failed” instead of “Post will be published...”.
Investigation
Described from the comment #12466 (comment), the
shouldAttemptAutoUpload
returnsfalse
. This is why the action is.autoSave
instead of.upload
. TheshouldAttemptAutoUpload
is initially set totrue
here:WordPress-iOS/WordPress/Classes/ViewRelated/Post/PostEditor+Publish.swift
Line 87 in 2c6380a
However, something in our code changed the
status
to.failed
which resulted in the hash changing, and ultimately theshouldAttemptAutoUpload
return value.WordPress-iOS/WordPress/Classes/Models/AbstractPost+HashHelpers.m
Lines 7 to 25 in 2c6380a
This is a case we probably did not find during #12252. Though it's worth investigating if this worked in #12252 and we somehow changed the location of when we set
shouldAttemptUpload
to true.The text was updated successfully, but these errors were encountered: