-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Blog.dotComID value if needed before saving #23884
Update Blog.dotComID value if needed before saving #23884
Conversation
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
|
// | ||
// It's important that calling `[self dotComID]` repeatedly only updates | ||
// `Blog` instance once, which is the case at the moment. | ||
[self dotComID]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like a good place to do it: "This method can have “side effects” on persistent values. You can use it to, for example, compute persistent values from other transient or scratchpad values." 👍
Having said that, this rename to dotComID
has been a real PITA. It's be nice to do a migration and remove the original field. I plan to wrap up this #23788 this week and add more stuff that can be removed form the database. And there are a ton of existing deprecations, especially in Blog
.
Issue
Blog.blogID
could be 0, even though it's a dot com site and we know its site id from its jetpack info. This is an edge case that happens after a non-jetpack site is connected to jetpack.WordPress-iOS/WordPress/Classes/Models/Blog/Blog.m
Lines 765 to 777 in 629899b
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.Testing checklist: