Skip to content
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

Invites: Fixes error when attempting to accept follower invites #1524

Merged
merged 1 commit into from
Dec 12, 2015

Conversation

ebinnion
Copy link
Contributor

While testing a follower invite, I noticed that the invitation never fully loaded because of a JS error:

Uncaught TypeError: this.getSiteName is not a function

screen shot 5 3 48 56 pm

This PR fixes that by adding the method back.

cc @lezama

To test:

  • Checkout fix/invites-get-site-name-error branch
  • Create a follower invite on a public WordPress.com site by going to $site/wp-admin/users.php?page=wpcom-invite-users
  • After the page reloads, copy the link address for resending the invitation.
  • Make note of the $invitation_key
  • In the invitation email that you get, make note of the $key and the $activation parameters in the activation link
  • Go to /accept-invite/$site/$invitation_key/$activate/$key
  • Are there JS errors? No? Good.

@ebinnion ebinnion added [Type] Bug [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. People Management labels Dec 11, 2015
@ebinnion ebinnion self-assigned this Dec 11, 2015
@ebinnion ebinnion added this to the People Management: m6 milestone Dec 11, 2015
const { site } = this.props;

return site.title || '';
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this new function being used?
also why not just
return this.props.site || this.props.site.title;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That function was an already existing function, which was then mistakenly removed. 😞

So, you'll see that the function is getting called in a few places throughout the same file.

We return '' if a site title doesn't exist because we are using the title in translations and don't want an object.

lezama added a commit that referenced this pull request Dec 12, 2015
Invites: Fixes error when attempting to accept follower invites
@lezama lezama merged commit 5b95419 into master Dec 12, 2015
@scruffian scruffian removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 12, 2015
@lezama lezama deleted the fix/invites-get-site-name-error branch December 12, 2015 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants