0

Sine 6.0-RC1 the following console error appears on the block widgets screen, on Firefox:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
NotEmpty@https://betatest.opajaap.nl/wp-includes/js/dist/widgets.js?ver=80e98954519d1dad7a91a2248dbc2cc9:1118:7
div
Edit@https://betatest.opajaap.nl/wp-includes/js/dist/widgets.js?ver=80e98954519d1dad7a91a2248dbc2cc9:1051:7
Edit@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:12908:7
withToolbarControls</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:12263:7
withInspectorControl</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:12475:26
custom_class_name_withInspectorControl</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:12582:35
withBlockControls</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:36311:33
withDuotoneControls</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:36678:32
withInspectorControls</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:36924:7
queryTopInspectorControls</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-library.js?ver=c0a77efe7e30b81595292ba7bdec3d8f:35990:7
withMoveToWidgetAreaToolbarItem</<@https://betatest.opajaap.nl/wp-includes/js/dist/edit-widgets.js?ver=6d1c3f1e5fbca4e69781de58b399425e:2327:7
FilteredComponentRenderer@https://betatest.opajaap.nl/wp-includes/js/dist/components.js?ver=704ed65a1b8b5c891184113526f15ce4:73834:9BlockListBlock@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:18670:7
withDataAlign</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:12314:7
withBorderColorPaletteStyles</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:32258:7
withColorPaletteStyles</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:34086:7
withFontSizeInlineStyles</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:35312:31
withElementsStyles</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:36324:112
withDuotoneStyles</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:36722:29
withLayoutStyles</<@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:36944:7
FilteredComponentRenderer@https://betatest.opajaap.nl/wp-includes/js/dist/components.js?ver=704ed65a1b8b5c891184113526f15ce4:73834:9
ifCondition/</<@https://betatest.opajaap.nl/wp-includes/js/dist/compose.js?ver=da94d523b115836ddbf0b3b774ddd94a:2201:8
withDispatch/</<@https://betatest.opajaap.nl/wp-includes/js/dist/data.js?ver=38ad563aa39c8f314fe6f6e430d81a69:4316:46
withSelect/</<@https://betatest.opajaap.nl/wp-includes/js/dist/data.js?ver=38ad563aa39c8f314fe6f6e430d81a69:4160:31
@https://betatest.opajaap.nl/wp-includes/js/dist/compose.js?ver=da94d523b115836ddbf0b3b774ddd94a:2236:12
Items@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:31568:7
BlockListItems
BlockContextProvider@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:12861:7
UncontrolledInnerBlocks@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:31358:7
ControlledInnerBlocks@https://betatest.opajaap.nl/wp-includes/js/dist/block-editor.js?ver=e2ef0c6eb29e06ea9efedec924f1b9a8:31396:15

ETC ETC

I found out that this only happens when plugin wp-photo-album-plus is activated (of which i am the author), and it only happens when one specific classic widget out of a total of 20 is loaded (need not to be activated).

Even when i strip the code to the bare minimum this errors arise although it functions correct both at admin and froontend.

The bare minimum code is:

/* wppa-searchwidget.php
* Package: wp-photo-album-plus
*
* display the search widget
* Version 8.0.09.003
*
*/

class wppaSearchPhotos extends WP_Widget {

    /** constructor */
    function __construct() {
        $widget_ops = array(    'classname' => 'wppa_search_photos',
                                'description' => __( 'Display search photos dialog', 'wp-photo-album-plus' )
                            );
        parent::__construct( 'wppa_search_photos', __( 'WPPA+ Search Photos', 'wp-photo-album-plus' ), $widget_ops );
    }

    /** @see WP_Widget::widget */
    function widget( $args, $instance ) {

    }

    /** @see WP_Widget::update */
    function update( $new_instance, $old_instance ) {

        $instance = $new_instance;

        return $instance;
    }

    /** @see WP_Widget::form */
    function form( $instance ) {

    }

} // class wppaSearchPhotos

// register wppaSearchPhotos widget
add_action('widgets_init', 'wppa_register_wppaSearchPhotos' );

function wppa_register_wppaSearchPhotos() {
    register_widget( "wppaSearchPhotos" );
}

Do i something wrong or is this a 6.0-RC1 bug ?

2
  • I've copied your exact code into a fresh site running 6.0-RC1-53356 and I'm not seeing this error. Commented May 6, 2022 at 10:37
  • Did you install the plugin wp-photo-album-plus? I expect that the issue only arises when all the other widgets (total 20) are loaded. You can easely inhibit loading one by one in the file wppa-init.php where all the widgets - each in its own file - are loaded. If you have the issue reproduced, comment the second require_once away and the issue is vanished. Commented May 7, 2022 at 16:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.