Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate ID wpseo-metabox-root #22051

Open
3 of 7 tasks
kkmuffme opened this issue Feb 18, 2025 · 5 comments · May be fixed by #22058
Open
3 of 7 tasks

Duplicate ID wpseo-metabox-root #22051

kkmuffme opened this issue Feb 18, 2025 · 5 comments · May be fixed by #22058

Comments

@kkmuffme
Copy link
Contributor

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened

To Reproduce

Step-by-step reproduction instructions

  1. open any page/product edit page e.g. /wp-admin/post.php?post=1234&action=edit
  2. check dev tools

Expected results

No duplicate ID used, since this isn't valid

Actual results

There are multiple elements with the same id="wpseo-metabox-root"

Technical info

  • If relevant, which editor is affected (or editors):
  • Block Editor
  • Gutenberg Editor
  • Elementor Editor
  • Classic Editor
  • Other:

Used versions

  • WordPress version: 6.7
  • Yoast SEO version: 24.4
@josevarghese
Copy link
Contributor

Hi @kkmuffme

Thank you for reporting this issue. Unfortunately, the steps to reproduce the problem are missing from your report.

To help us investigate further, please share or update the issue with clear details, specifying which file name and its response you are experiencing the problem with. Also, could you include a screenshot of the issue to provide more context, which will help us replicate and resolve it more efficiently?

dilipbheda added a commit to dilipbheda/wordpress-seo that referenced this issue Feb 19, 2025
@dilipbheda dilipbheda linked a pull request Feb 19, 2025 that will close this issue
18 tasks
@dilipbheda
Copy link
Contributor

Steps to Reproduce

  1. Navigate to the WordPress admin panel: {siteurl}/wp-admin/post.php?post=1234&action=edit
  2. Open the browser console and paste the following JavaScript code to identify duplicate IDs.
  3. The duplicate IDs should be visible on the console.log().

Image

const ids = [...document.querySelectorAll('[id]')].map(el => el.id);
const duplicates = ids.filter((id, index, arr) => arr.indexOf(id) !== index);
console.log("Duplicate IDs:", [...new Set(duplicates)]);

@kkmuffme
Copy link
Contributor Author

@josevarghese

Unfortunately, the steps to reproduce the problem are missing from your report.

The steps to reproduce are there in the report? What about them is unclear to you?

@josevarghese
Copy link
Contributor

Hi @kkmuffme

The steps you've provided are not clear even for my other colleague, which I had asked to check internally. However, the steps shared by @dilipbheda are very clear for me.

@kkmuffme
Copy link
Contributor Author

Can you please let me know what specifically was unclear, so I can better report it next time?

  1. open any page/product edit page e.g. /wp-admin/post.php?post=1234&action=edit

This I guess was clear.

  1. check dev tools

Opening dev tools should be clear enough I guess?

There are multiple elements with the same id="wpseo-metabox-root"

Pretty clear too, isn't it?

Would appreciate some feedback, since you always (!) comment this text on most of my issues, but my issues always seem to be clear to other people, since they provide a PR or discussion on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants