Skip to content

Block: getAuthors() deprecation notice #9240

Closed

Description

@spacedmonkey

Feature Description

When using the story picker in the web stories gutenberg block, the following noticed is displayed.

react_devtools_backend.js:4049 select( 'core' ).getAuthors() is deprecated since version 5.9. Please use select( 'core' ).getUsers({ who: 'authors' }) instead. 
    at SelectStories 

See screenshot for full details.
Screenshot 2021-10-04 at 16 45 49

This change happened upstream here WordPress/gutenberg#33725

Alternatives Considered

Additional Context

Activity

  1. added
    Type: Enhancement
    Group: WordPress
    Group: Blocks
    on Oct 4, 2021
  2. changed the title [-]getAuthors() is deprecated noticed[/-] [+]getAuthors() is deprecation noticed[/+] on Oct 4, 2021
  3. changed the title [-]getAuthors() is deprecation noticed[/-] [+]`getAuthors()` is deprecation noticed[/+] on Oct 4, 2021
  4. changed the title [-]`getAuthors()` is deprecation noticed[/-] [+]Block: `getAuthors()` deprecation notice[/+] on Oct 5, 2021
  5. swissspidy commented on Oct 5, 2021

    @swissspidy
    Collaborator

    Relevant issues/PRs:

    Here's where the post author dropdown was updated to use getUsers in Gutenberg: WordPress/gutenberg#33695

    Here's where getUsers gained the ability to fetch with context=view so that it can be used for things like the author dropdown: WordPress/gutenberg#32961

    I asked for some clarification on WordPress/gutenberg#33725 (comment) and am curious to hear what the team says.

  6. self-assigned this
    on Oct 5, 2021
  7. spacedmonkey commented on Oct 5, 2021

    @spacedmonkey
    ContributorAuthor

    Until we hear back from the Gutenberg team on this one, I think we can consider this one blocked. I agree with you, that doing version checks is not really the best solution here.

  8. added
    Status: Blocked
    on Oct 5, 2021
  9. added
    P3
    on Nov 11, 2021
  10. spacedmonkey commented on Dec 2, 2021

    @spacedmonkey
    ContributorAuthor

    @swissspidy What is happening with this ticket?

  11. swissspidy commented on Dec 2, 2021

    @swissspidy
    Collaborator

    No action needed for now

  12. spacedmonkey commented on Dec 3, 2021

    @spacedmonkey
    ContributorAuthor

    Isn't the message in Gutenberg not wrong. We shouldn't be pushing people to be using who param.

  13. swissspidy commented on Dec 3, 2021

    @swissspidy
    Collaborator

    Yes and no. I mentioned that in WordPress/gutenberg#33725 (comment) as well. But since Gutenberg also supports WP 5.8, who still needs to be used.

    Something to figure out on the Gutenberg repo though.

  14. added
    P2
    and removed
    Status: Blocked
    P3
    on Oct 31, 2022
  15. swissspidy commented on Oct 31, 2022

    @swissspidy
    Collaborator

    We can now remove compat code in places like \Google\Web_Stories\REST_API\Stories_Users_Controller::filter_user_query() and getAuthors() (found twice, in wp-dashboard and wp-story-editor)

    We can also remove the line & todo in bootstrap.js in the e2e tests

  16. self-assigned this
    on Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Group: BlocksGroup: WordPressP2Type: Enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions