Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#54098 new defect (bug)

WordPress 5.8 - Cannot read properties of undefined (reading 'clientId')

Reported by: ahsynv's profile ahsynv Owned by:
Milestone: Awaiting Review Priority: normal
Severity: blocker Version:
Component: Editor Keywords:
Focuses: Cc:

Description

Hi,

We updated our wordpress to 5.8 (we also tried 5.8.1 today), and just after that, we have an error on post edit page, in the console

data.min.js?ver=a9e98fe3ad76884fe7909ba8348395b7:2 An error occurred while running 'mapSelect': Cannot read properties of undefined (reading 'clientId')
The error may be correlated with this previous error:
TypeError: Cannot read properties of undefined (reading 'clientId')
    at we (https://mywebsite.com/wp-includes/js/dist/block-editor.min.js?ver=fc8c27c6e95e7e0d59b4e344cb9ddfed:12:100185)
    at https://mywebsite.com/wp-includes/js/dist/data.min.js?ver=a9e98fe3ad76884fe7909ba8348395b7:2:13742
    at r (https://mywebsite.com/wp-includes/js/dist/data.min.js?ver=a9e98fe3ad76884fe7909ba8348395b7:2:13559)
    at https://mywebsite.com/wp-includes/js/dist/block-editor.min.js?ver=fc8c27c6e95e7e0d59b4e344cb9ddfed:12:285498
    at Object.current (https://mywebsite.com/wp-includes/js/dist/data.min.js?ver=a9e98fe3ad76884fe7909ba8348395b7:2:21206)
    at https://mywebsite.com/wp-includes/js/dist/data.min.js?ver=a9e98fe3ad76884fe7909ba8348395b7:2:20809
    at __experimentalMarkListeningStores (https://mywebsite.com/wp-includes/js/dist/data.min.js?ver=a9e98fe3ad76884fe7909ba8348395b7:2:16751)
    at Object.__experimentalMarkListeningStores (https://mywebsite.com/wp-includes/js/dist/data.min.js?ver=a9e98fe3ad76884fe7909ba8348395b7:2:17238)
    at https://mywebsite.com/wp-includes/js/dist/data.min.js?ver=a9e98fe3ad76884fe7909ba8348395b7:2:20171
    at e (https://mywebsite.com/wp-includes/js/dist/data.min.js?ver=a9e98fe3ad76884fe7909ba8348395b7:2:20801)

Original stack trace:

When we downgrade to version 5.7.2 of wordpress, error disappear

We found the problem, and it is coming from our custom post taxonomy named "selection", in the args we put "show_in_rest" true, when it is false it is ok but we dont see that in Gutenberg so it is not the solution, and when we rename "selection" to "selectiontest" for example it is works but we lost our datas inside this taxonomy

We looked at "Reserved Terms" of wordpress, but "selection" is not in the list (https://codex.wordpress.org/Reserved_Terms)

Our code

<?php
                $args = array(
                        'labels'            => $labels, // $labels is our labels array
                        'hierarchical'      => true,
                        'public'            => false,
                        'show_ui'           => true,
                        'show_admin_column' => true,
                        'show_in_nav_menus' => true,
                        'show_in_rest'      => true,
                        'show_tagcloud'     => false,
                        'rewrite'           => false
                );

register_taxonomy('selection', array('post'), $args);

For the args, we are using the same config for other taxonomies too but the only "selection" is a problem, maybe something was added in the 5.8 and create a conflict with this name ?

Change History (4)

#2 @ahsynv
3 years ago

Someone there ?

I also tested this taxonomy "selection" in a fresh wordpress installation, default theme by wordpress & 0 plugin, but error persist

#3 follow-up: @SergeyBiryukov
3 years ago

  • Component changed from General to Editor

Hi there, welcome to WordPress Trac! Thanks for the report.

It sounds like selection might need to be added to the list of the reserved terms.

#4 in reply to: ↑ 3 @ahsynv
3 years ago

  • Severity changed from normal to blocker

Replying to SergeyBiryukov:

Hi there, welcome to WordPress Trac! Thanks for the report.

It sounds like selection might need to be added to the list of the reserved terms.

Hi, thank you for your reply. What does it mean ? "Selection" is a reserved theme and we need to update "selection" taxonomy name by another name ? Or WordPress will get an update about this conflict ?

Last edited 3 years ago by ahsynv (previous) (diff)

This ticket was mentioned in Slack in #core-test by hellofromtonya. View the logs.


3 years ago

Note: See TracTickets for help on using tickets.