[wp-trac] [WordPress Trac] #54098: WordPress 5.8 - Cannot read properties of undefined (reading 'clientId')

WordPress Trac noreply at wordpress.org
Thu Sep 9 09:45:40 UTC 2021


#54098: WordPress 5.8 - Cannot read properties of undefined (reading 'clientId')
--------------------------+-----------------------------
 Reporter:  ahsynv        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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
 <?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 ?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54098>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list