WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 6 days ago

#53266 closed enhancement (invalid)

Found 2 elements with non unique id

Reported by: yagniksangani Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.7.2
Component: Quick/Bulk Edit Keywords: close
Focuses: ui, coding-standards Cc:

Description

I have tested WordPress on one of my setups and found warnings in the console related to dom elements non-unique ids. I have debugged on it and checked that when we apply bulk edit action on any custom registered postype list table at that time html will show for bulk section with selection of categories and those html contains non-unique ids.

I have checked that in WordPress core code there is 'wp_terms_checklist' under 'wp-admins/includes/class-wp-posts-list-table.php' which creating the HTML for it.

You can see here screenshot, https://www.awesomescreenshot.com/image/8596764?key=170fe9c0381cdff32499aef8eb88a7dd

Attachments (2)

non-unique-id-warning-dom.png (78.8 KB) - added by yagniksangani 5 months ago.
screenshot-field.png (61.0 KB) - added by yagniksangani 5 months ago.

Download all attachments as: .zip

Change History (10)

#1 @SergeyBiryukov
5 months ago

  • Component changed from General to Quick/Bulk Edit

#2 @justinahinon
5 months ago

Hello @yagniksangani. Welcome to Trac and thanks for opening the ticket.

I was not able to reproduce the issue on my setup.
I'm wondering; the non-unique ids you are noticing may be caused by the markup of the plugin in the screenshot (WPCloud Deploy).

Could you try creating a simple custom post type (using this plugin for example https://wordpress.org/plugins/custom-post-type-ui), and check again if you still have the console notice?

Here are my setup information:

WordPress 5.7.2
Theme: Twenty Twenty One
Plugins: CPT UI
macOS Big Sur 11.1

Tested on

  • Firefox Developer Edition 89.0b15
  • Chrome 90.0.4430.212
  • Safari 14.0.2

#3 @yagniksangani
5 months ago

I have checked by adding registering post-type and also checked in fresh setup. This warning not showing when viewing the list page of any custom posttype. For the listing page, I have added a custom button and on click of that button opens a popup with form and after that warning will be displayed. As you can see in the previously attached screenshot. I have debugged more with the custom popup functionality and found that when we use the "password" input field at that time warning will be showing. So it's wiered if we are using input type password in popup form on listing screen then only showing warning of non unique id of bulk edit HTML.

#4 @yagniksangani
4 weeks ago

  • Keywords close added; needs-testing removed
  • Resolution set to invalid
  • Status changed from new to closed

#5 @desrosj
3 weeks ago

  • Keywords close removed
  • Milestone Awaiting Review deleted

@yagniksangani Just confirming that closing the ticket was intentional.

#6 @yagniksangani
3 weeks ago

  • Keywords needs-patch added
  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Type changed from defect (bug) to enhancement

#7 @desrosj
3 weeks ago

  • Milestone set to Awaiting Review

#8 @yagniksangani
6 days ago

  • Keywords close added; needs-patch removed
  • Resolution set to invalid
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.