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

User mention autocompletion fails if avatar_urls array is not set #18258

Closed
glendaviesnz opened this issue Nov 4, 2019 · 0 comments · Fixed by #18259
Closed

User mention autocompletion fails if avatar_urls array is not set #18258

glendaviesnz opened this issue Nov 4, 2019 · 0 comments · Fixed by #18259
Assignees
Labels
[Type] Bug An existing feature does not function as intended

Comments

@glendaviesnz
Copy link
Contributor

Describe the bug

Currently if a site is returning false for get_option( 'show_avatars' ) the @ mentions autocompletion fails due to a Cannot read property '24' of undefined error.

To reproduce
Steps to reproduce the behavior:

  1. Set the show_avatars option to false for a given site
  2. Open dev tools console
  3. In the given site add a new post and try to mention a user by typing @joemaller
  4. User autocomplete dropdown does not display and error can be seen in console

Expected behavior
If a site has show_avatars set to false then the user autocomplete dropdown should still display but without avatars

Screenshots
user-auto-complete

Desktop :

  • OS: OSX
  • Browser: Chrome
  • Version 78.0.3904.70

Can be replicated on 6.8 and latest Gutenberg master.

@mmtr mmtr added the [Type] Bug An existing feature does not function as intended label Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants