Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
c5338e00
Commit
c5338e00
authored
Mar 14, 2015
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2386903
by pfrenssen: Warning: DOMDocument::importNode() ID already defined
parent
be30a526
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/simpletest/src/WebTestBase.php
+5
-1
5 additions, 1 deletion
core/modules/simpletest/src/WebTestBase.php
with
5 additions
and
1 deletion
core/modules/simpletest/src/WebTestBase.php
+
5
−
1
View file @
c5338e00
...
@@ -1899,8 +1899,12 @@ protected function drupalProcessAjaxResponse($content, array $ajax_response, arr
...
@@ -1899,8 +1899,12 @@ protected function drupalProcessAjaxResponse($content, array $ajax_response, arr
if
(
$wrapperNode
)
{
if
(
$wrapperNode
)
{
// ajax.js adds an enclosing DIV to work around a Safari bug.
// ajax.js adds an enclosing DIV to work around a Safari bug.
$newDom
=
new
\DOMDocument
();
$newDom
=
new
\DOMDocument
();
// DOM can load HTML soup. But, HTML soup can throw warnings,
// suppress them.
@
$newDom
->
loadHTML
(
'<div>'
.
$command
[
'data'
]
.
'</div>'
);
@
$newDom
->
loadHTML
(
'<div>'
.
$command
[
'data'
]
.
'</div>'
);
$newNode
=
$dom
->
importNode
(
$newDom
->
documentElement
->
firstChild
->
firstChild
,
TRUE
);
// Suppress warnings thrown when duplicate HTML IDs are encountered.
// This probably means we are replacing an element with the same ID.
$newNode
=
@
$dom
->
importNode
(
$newDom
->
documentElement
->
firstChild
->
firstChild
,
TRUE
);
$method
=
isset
(
$command
[
'method'
])
?
$command
[
'method'
]
:
$ajax_settings
[
'method'
];
$method
=
isset
(
$command
[
'method'
])
?
$command
[
'method'
]
:
$ajax_settings
[
'method'
];
// The "method" is a jQuery DOM manipulation function. Emulate
// The "method" is a jQuery DOM manipulation function. Emulate
// each one using PHP's DOMNode API.
// each one using PHP's DOMNode API.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment