-
Notifications
You must be signed in to change notification settings - Fork 799
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
Fix DIY migration failing to fetch migration key and throwing 403 on page reload #40270
base: trunk
Are you sure you want to change the base?
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! |
@Imran92 Looks like this one needs a rebase. |
6e356a7
to
acd888f
Compare
…/migration-diy-throws-403-on-page-reload' of github.com:Automattic/jetpack into fix/migration-diy-throws-403-on-page-reload
@donnapep thanks! I've rebased it |
I've tried several times, but I'm not able to reproduce this error. There was a time where I saw it quite frequently, but even without this change, it seems to work for me. I guess I'll leave it for someone else to review to see if they can reproduce the error. |
Sure! Just to recheck - did you unhide the migration key after generating it? This error is generated only if you unhide it at lest once, and then retry loading the page |
@@ -73,10 +73,6 @@ public function can_access() { | |||
return false; | |||
} | |||
|
|||
if ( 'read' === get_option( $this->key_is_read_option_name, false ) ) { |
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 the key_is_read_option_name
option is not used anymore. What do you think of cleaning up the related logic (removing the variable and the update_option call)?
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.
I had no issues reproducing it and the fix works as described! I've left one small suggestion.
Fixes Automattic/wp-calypso#96510
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
1.1. Navigate to
/start
.1.2. Choose "Import existing content or website" in the goals step.
1.3. Navigate through the flow, selecting to migrate from a WordPress site, and the "I'll do it myself" option.
/sites
./wpcom-migration-key
API and make sure it has returned 403