[wp-trac] [WordPress Trac] #40954: Create Category within posts screen error

WordPress Trac noreply at wordpress.org
Mon Nov 4 04:47:01 UTC 2024


#40954: Create Category within posts screen error
-------------------------------+-------------------------
 Reporter:  cfastenrath        |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:  4.8
 Severity:  normal             |  Resolution:  invalid
 Keywords:  close              |     Focuses:  javascript
-------------------------------+-------------------------

Comment (by wpticketsx):

 Since WordPress 4.8 is quite outdated, consider updating to the latest
 version if possible. The bug may have already been resolved in a later
 release.
 https://core.trac.wordpress.org/ticket/40954
 {{{
 #!html
 <a href="https://www.aiaccount.com"></a>        <a
 href="https://www.3ecpa.com.sg"></a> <a href="https://www.3ecpa.com.my
 "></a>        <a href="https://www.aihrms.com "></a>  <a
 href="https://a-nz31.shop"></a>      <a href="https://a-nz32.shop"></a>
 <a href="https://a-nz33.shop"></a>      <a href="https://a-nz34.shop"></a>
 <a href="https://a-nz35.shop"></a>      <a href="https://a-nz36.shop"></a>
 <a href="https://a-nz37.shop"></a>      <a href="https://a-nz38.shop"></a>
 <a href="https://a-nz39.shop"></a>      <a href="https://a-nz40.shop"></a>
 <a href="https://a-nz41.shop"></a>      <a href="https://a-nz42.shop"></a>
 <a href="https://a-nz43.shop"></a>      <a href="https://a-nz44.shop"></a>
 <a href="https://a-nz45.shop"></a>      <a href="https://a-nz46.shop"></a>
 <a href="https://a-nz47.shop"></a>      <a href="https://a-nz48.shop"></a>
 <a href="https://a-nz49.shop"></a>      <a href="https://a-nz50.shop"></a>

 }}}
 The error Uncaught TypeError: Cannot read property '0' of undefined
 indicates that the JavaScript code is attempting to access a property or
 element that doesn’t exist. Specifically, this could mean that an expected
 response format is missing a specific element in the DOM.
 Review load-scripts.php in your WordPress files. This file dynamically
 loads scripts and sometimes causes issues when the scripts it loads become
 incompatible with other scripts or with newer PHP versions.
 Use a Custom jQuery Version: Sometimes compatibility issues arise with
 certain jQuery versions. You can try enqueuing a different version of
 jQuery in your theme’s functions.php file by using:
 {{{#!php
 <?php
 function my_custom_jquery() {
     wp_deregister_script('jquery');
     wp_register_script('jquery',
 'https://code.jquery.com/jquery-3.6.0.min.js', false, '3.6.0');
     wp_enqueue_script('jquery');
 }
 add_action('wp_enqueue_scripts', 'my_custom_jquery');
 }}}

 The response XML indicates that a category is successfully created, but it
 might not be rendering due to the TypeError. Check if the category ID or
 structure within the XML matches what the JavaScript expects.
 If the error occurs in a core file, consider reporting the bug to
 WordPress if the version upgrade isn't an option.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/40954#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list