Skip to content

Fix regression bug for category select in QueryControls component #24516

Merged
youknowriad merged 1 commit intoWordPress:masterfrom
gchtr:fix-querycontrols-backwards-compatibility
Aug 20, 2020
Merged

Fix regression bug for category select in QueryControls component #24516
youknowriad merged 1 commit intoWordPress:masterfrom
gchtr:fix-querycontrols-backwards-compatibility

Conversation

@gchtr
Copy link
Copy Markdown
Contributor

@gchtr gchtr commented Aug 12, 2020

Description

In #23419, backwards compatibility with <QueryControls> was fixed. However, the <CategorySelect> still misses the onChange property, causing an error when a category is selected from the dropdown:

Uncaught TypeError: onChange is not a function

How has this been tested?

I manually tested the fix and I ran npm run test locally.

Types of changes

Bug fix.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@mindctrl
Copy link
Copy Markdown

Just ran into this issue with a block that uses this component.

@mindctrl
Copy link
Copy Markdown

@youknowriad thoughts on this? It's a breaking change. Is there guidance here for if/when this will be merged and/or if the recommended path is something else?

@youknowriad youknowriad requested a review from draganescu August 18, 2020 12:11
@youknowriad youknowriad added [Type] Bug An existing feature does not function as intended Backport to WP Core labels Aug 18, 2020
@youknowriad
Copy link
Copy Markdown
Contributor

I'm not sure I follow everything here but @draganescu should know more as the original PR author. I added the corresponding labels for Core backports.

Copy link
Copy Markdown
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

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

Somehow this got away in the PR that should have fixed everything. Thanks @gchtr !

@faia20
Copy link
Copy Markdown

faia20 commented Sep 2, 2020

was this fixed for 5.5.1? Because I still have the same issue

@youknowriad
Copy link
Copy Markdown
Contributor

@faia20 Do you have the Gutenberg plugin enabled or disabled?

@faia20
Copy link
Copy Markdown

faia20 commented Sep 2, 2020

@faia20 Do you have the Gutenberg plugin enabled or disabled?
Hey @youknowriad
The plugin it's Enabled

@youknowriad
Copy link
Copy Markdown
Contributor

that's the reason, the fix didn't make it yet to the plugin, if you disable the plugin, it should work.

@faia20
Copy link
Copy Markdown

faia20 commented Sep 2, 2020

that's the reason, the fix didn't make it yet to the plugin, if you disable the plugin, it should work.

you're right! I've disabled and it's working!
Thanks

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

Development

Successfully merging this pull request may close these issues.

6 participants