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

JS Warnings when clicking the Publish button #10875

Closed
afercia opened this issue Oct 21, 2018 · 4 comments
Closed

JS Warnings when clicking the Publish button #10875

afercia opened this issue Oct 21, 2018 · 4 comments
Assignees
Labels
[Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Oct 21, 2018

Describe the bug
Not sure this is already tracked. If it's a known issue, of course do feel free to close.

  • create a post
  • press the Publish button and observe your browser's dev tools console

I'm getting the following warnings:

Warning: React does not recognize the `postType` prop on a DOM element. 
Warning: React does not recognize the `hasPublishAction` prop on a DOM element.
Warning: React does not recognize the `isPublished` prop on a DOM element.
Warning: React does not recognize the `isSaving` prop on a DOM element.
Warning: React does not recognize the `isDirty` prop on a DOM element.

Seems to me they come from the post publish panel:

<div className="editor-post-publish-panel" { ...additionalProps }>

Where { ...additionalProps } are passed to a <div> element. Dumping the passed props, they're:

aria-label: "Editor publish"
hasPublishAction: [{…}]
isDirty: false
isPublished: false
isSaving: undefined
postType: "post"
role: "region"
tabIndex: -1

where I guess only aria-label, role, and tabIndex should be passed because they make this div a navigable region.

@afercia afercia added the [Type] Bug An existing feature does not function as intended label Oct 21, 2018
@jhhazelaar
Copy link

Same here. Version 4.0.0

@desrosj
Copy link
Contributor

desrosj commented Oct 25, 2018

This does not happen for me using WordPress 5.0 with the plugin off. It is happening for me using WordPress 4.9.8 and 5.0 with the plugin activated, though.

@desrosj desrosj added this to the WordPress 5.0 milestone Oct 25, 2018
@afercia
Copy link
Contributor Author

afercia commented Oct 26, 2018

@desrosj seems this has been fixed a day ago? See 09a9f8e#diff-d9f39303d3d23634ea1f3022808910c5R58

/Cc @nosolosw

@oandregal
Copy link
Member

I've noticed that as well and removed most of them in a PR yesterday that will be released with 4.2. #11093 fixes the one remaining.

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

No branches or pull requests

4 participants