When I disable Visual Editor in App Settings, then go to a site -> Blog Posts, I'd expect tapping the + (plus) icon in the top right to start a new post in that site.
Instead, the plus icon starts a new post in my primary site — with no way to change it.
I found this out after accidentally publishing to my primary blog. Luckily I caught it and deleted it right away.
Starting by disabling settings:
This is the site I want to post to:
Note: wrong site! This isn't the same one (but it's my primary site)
iPhone 6+, 9.3.2, 6.3.0.20160524
Hmm — might be a false alarm. :/ After going back to sites list a few times, now it seems to be working as expected.
I reproduced the issue the first two times I tried it. In those cases, I was already on a different site (not primary site) before disabling the visual editor. Here were my steps:
Result: A new post was started for my primary site
I then closed the editor and continued:
Result: A new post was started for the site I had selected
This feels like a familiar issue but I can't find a related report.
Tested on iPhone 6, iOS 9.3.2, WPiOS 6.3.0.20160524
I'm not sure this is the same issue, but this morning I ran into a similar problem while the visual editor was enabled:
Result: A new post was started for my primary site
I then closed the editor and continued:
Result: A new post was started for the correct (non-primary) site
I went back and forth, and the editor icon kept opening the editor for the wrong site. When I went back to the site picker and re-selected the same non-primary site, both the editor icon and the plus icon opened the editor for the correct site.
I think this is somehow related to the app's state when you open it and have a non-primary site already selected in the My Sites section.
Looking at the code I see some spots where the logic might be wrong. By default, the post button will create a post in the last used blog, and fall back to primary, or the first blog in the list if there's no primary.
The problem might lie in the "last used" flag, which is set in 3 scenarios:
That last one was definitely a surprise, and probably the cause of this, but there's also another possible scenario:
So just to clarify the desired behavior:
Does that sound right?
Yes that sounds right to me, so if I go to my photo blog (not my primary site), then tap the reader, then tap "new post", it'll post to the photo blog?
To clarify "Every time the primary blog detail is configured" - that's going to be removed?
To clarify "Every time the primary blog detail is configured" - that's going to be removed?
Yes. I think the logic was that when you sign in, it'd mark the primary blog as the "last used", but even if that was the case I don't think that's what we'd want.
That sounds good to me. Thanks for clarifying.