You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When plugins use the FocalPointPicker component and the FocalPointPicker displays for the first time, it looks to cause a console warning. This isn't present at all without the FocalPointPicker:
react-dom.165d5c53.js:500 Warning: Received NaN for the `value` attribute. If this is expected, cast the value to a string.
in input
in div (created by De)
in div (created by De)
in De
in Unknown (created by WithState(Component))
in WithState(Component) (created by WithInstanceId(WithState(Component)))
in WithInstanceId(WithState(Component)) (created by t)
in div (created by t)
in t (created by ForwardRef(PanelBody))
in ForwardRef(PanelBody) (created by t)
in t (created by Context.Consumer)
in se (created by InspectorControlsSlot)
in InspectorControlsSlot
in div
in Unknown (created by n)
in n (created by Context.Consumer)
in WithSelect(Component)
in div (created by t)
in t (created by ForwardRef(PanelBody))
in ForwardRef(PanelBody)
in div (created by sn)
in sn
in div (created by sn)
in sn (created by n)
in div (created by n)
in n (created by Context.Consumer)
in Unknown (created by b)
in b
in t (created by Context.Consumer)
in se (created by SidebarSlot)
in SidebarSlot
in div (created by t)
in t
in Unknown (created by n)
in n (created by Context.Consumer)
in WithViewportMatch(Component) (created by NavigateRegions(WithViewportMatch(Component)))
in div (created by NavigateRegions(WithViewportMatch(Component)))
in NavigateRegions(WithViewportMatch(Component)) (created by r)
in r (created by Context.Consumer)
in WithDispatch(NavigateRegions(WithViewportMatch(Component))) (created by n)
in n (created by Context.Consumer)
in WithSelect(WithDispatch(NavigateRegions(WithViewportMatch(Component)))) (created by t)
in t (created by t)
in div (created by t)
in t (created by t)
in t (created by t)
in t (created by r)
in r (created by Context.Consumer)
in WithDispatch(t)
in Unknown (created by Context.Consumer)
in WithRegistryProvider(WithDispatch(t)) (created by t)
in t (created by r)
in r (created by Context.Consumer)
in WithDispatch(t) (created by n)
in n (created by Context.Consumer)
in WithSelect(WithDispatch(t)) (created by t)
in StrictMode (created by t)
in t (created by n)
in n (created by Context.Consumer)
in WithSelect(t)
To reproduce
With AMP Plugin
Install the AMP plugin by running git clone -b amp-stories-redux https://github.com/ampproject/amp-wp.git amp
Possibly ssh into your environment, and cd to the amp/ directory
composer install && npm install && npm run dev
wp plugin activate amp
In /wp-admin > AMP, check "Enable experimental support for AMP Stories." (or go to /wp-admin/admin.php?page=amp-options)
In the admin bar, click New > AMP Story
Click the page, click Background Media > Select Media, select an image
react-dom.165d5c53.js:500 Warning: Received NaN for the `value` attribute. If this is expected, cast the value to a string.
in input
in div (created by De)
in div (created by De)
in De
in Unknown (created by WithState(Component))
in WithState(Component) (created by WithInstanceId(WithState(Component)))
in WithInstanceId(WithState(Component)) (created by t)
in div (created by t)
in t (created by ForwardRef(PanelBody))
in ForwardRef(PanelBody) (created by t)
in t (created by Context.Consumer)
in se (created by InspectorControlsSlot)
in InspectorControlsSlot
in div
in Unknown (created by n)
in n (created by Context.Consumer)
in WithSelect(Component)
in div (created by t)
in t (created by ForwardRef(PanelBody))
in ForwardRef(PanelBody)
in div (created by sn)
in sn
in div (created by sn)
in sn (created by n)
in div (created by n)
in n (created by Context.Consumer)
in Unknown (created by b)
in b
in t (created by Context.Consumer)
in se (created by SidebarSlot)
in SidebarSlot
in div (created by t)
in t
in Unknown (created by n)
in n (created by Context.Consumer)
in WithViewportMatch(Component) (created by NavigateRegions(WithViewportMatch(Component)))
in div (created by NavigateRegions(WithViewportMatch(Component)))
in NavigateRegions(WithViewportMatch(Component)) (created by r)
in r (created by Context.Consumer)
in WithDispatch(NavigateRegions(WithViewportMatch(Component))) (created by n)
in n (created by Context.Consumer)
in WithSelect(WithDispatch(NavigateRegions(WithViewportMatch(Component)))) (created by t)
in t (created by t)
in div (created by t)
in t (created by t)
in t (created by t)
in t (created by r)
in r (created by Context.Consumer)
in WithDispatch(t)
in Unknown (created by Context.Consumer)
in WithRegistryProvider(WithDispatch(t)) (created by t)
in t (created by r)
in r (created by Context.Consumer)
in WithDispatch(t) (created by n)
in n (created by Context.Consumer)
in WithSelect(WithDispatch(t)) (created by t)
in StrictMode (created by t)
in t (created by n)
in n (created by Context.Consumer)
in WithSelect(t)
Expected behavior
There should be no console warning. Though otherwise, this works fine.
The issue might be that these plugins pass some value to the FocalPointPicker that is undefined or null, causing the component's defaultProps not to take effect. In this case the value prop should not be passed at all, or always be a proper object.
The issue seems to be that the default state for percentages is an empty object, when instead it needs to be the default value of { x:0.5, y:0.5 }. See #15400.
Describe the bug
When plugins use the FocalPointPicker component and the
FocalPointPicker
displays for the first time, it looks to cause a console warning. This isn't present at all without theFocalPointPicker
:To reproduce
With AMP Plugin
git clone -b amp-stories-redux https://github.com/ampproject/amp-wp.git amp
ssh
into your environment, andcd
to theamp/
directorycomposer install && npm install && npm run dev
wp plugin activate amp
/wp-admin
> AMP, check "Enable experimental support for AMP Stories." (or go to /wp-admin/admin.php?page=amp-options)With CoBlocks Plugin
Expected behavior
There should be no console warning. Though otherwise, this works fine.
Desktop
Additional context
Gutenberg Version: 5.5.0
The text was updated successfully, but these errors were encountered: