DOMElement::setIdAttribute(): ID loading already defined

Open
#62 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
php
Domain
web-dev

Research direction

Start at Parser/DOMTreeBuilder.php line 392 and follow the reported parse path through HTML5.php and Tokenizer.php. The input is not provided, so first isolate an HTML document that triggers the duplicate ID warning; done means the warning no longer occurs for that reproducer.

Written by the indexing model from the issue text.

Description

Waiting feedback

Hello,

Sometimes i get strange error:

PHP Warning:  DOMElement::setIdAttribute(): ID loading already defined in /home/xxx/domains/xxx/public_html/xxx/core/framework/Masterminds/HTML5/Parser/DOMTreeBuilder.php on line 392
PHP Stack trace:
PHP   1. {main}() /home/xxx/domains/xxx/public_html/index.php:0
PHP   2. Core\xxx->loadPage() /home/xxx/domains/xxx/public_html/index.php:147
PHP   3. Modules\xxx\Main->load() /home/xxx/domains/xxx/public_html/xxx/core/xxx.php:619
PHP   4. Modules\xxx\Main->_startEngine() /home/xxx/domains/xxx/public_html/xxx/modules/xxx/main.php:301
PHP   5. Modules\xxx\Main->_runCrawler() /home/xxx/domains/xxx/public_html/xxx/modules/xxx/main.php:121
PHP   6. Core\Classes\Search\Crawler->visitPage() /home/xxx/domains/xxx/public_html/xxx/modules/xxx/main.php:154
PHP   7. Masterminds\HTML5->loadHTML() /home/xxx/domains/xxx/public_html/xxx/core/classes/search/crawler.php:28
PHP   8. Masterminds\HTML5->parse() /home/xxx/domains/xxx/public_html/xxx/core/framework/Masterminds/HTML5.php:94
PHP   9. Masterminds\HTML5\Parser\Tokenizer->parse() /home/xxx/domains/xxx/public_html/xxx/core/framework/Masterminds/HTML5.php:165
PHP  10. Masterminds\HTML5\Parser\Tokenizer->consumeData() /home/xxx/domains/xxx/public_html/xxx/core/framework/Masterminds/HTML5/Parser/Tokenizer.php:83
PHP  11. Masterminds\HTML5\Parser\Tokenizer->tagOpen() /home/xxx/domains/xxx/public_html/xxx/core/framework/Masterminds/HTML5/Parser/Tokenizer.php:126
PHP  12. Masterminds\HTML5\Parser\Tokenizer->tagName() /home/xxx/domains/xxx/public_html/xxx/core/framework/Masterminds/HTML5/Parser/Tokenizer.php:269
PHP  13. Masterminds\HTML5\Parser\DOMTreeBuilder->startTag() /home/xxx/domains/xxx/public_html/xxx/core/framework/Masterminds/HTML5/Parser/Tokenizer.php:371
PHP  14. DOMElement->setIdAttribute() /home/xxx/domains/xxx/public_html/xxx/core/framework/Masterminds/HTML5/Parser/DOMTreeBuilder.php:392
PHP Warning:  DOMElement::setIdAttribute(): ID placeholder already defined in /home/xxx/domains/xxx/public_html/xxx/core/framework/Masterminds/HTML5/Parser/DOMTreeBuilder.php on line 392

I don't know what the input is, but i hope you can help me?

Dominant language
HTML
Stars
1.8k
Forks
122
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Masterminds/html5-php

All issues in Masterminds/html5-php

Similar issues

More Web Dev issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.