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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
72d13bc3
Commit
72d13bc3
authored
16 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#295506
by swentel: node preview is rendered twice.
parent
c639b513
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
includes/common.inc
+10
-0
10 additions, 0 deletions
includes/common.inc
with
10 additions
and
0 deletions
includes/common.inc
+
10
−
0
View file @
72d13bc3
...
...
@@ -2765,6 +2765,11 @@ function drupal_render(&$elements) {
// Render all the children that use a theme function.
if
(
isset
(
$elements
[
'#theme'
])
&&
empty
(
$elements
[
'#theme_used'
]))
{
$elements
[
'#theme_used'
]
=
TRUE
;
$previous
=
array
();
foreach
(
array
(
'#type'
,
'#prefix'
,
'#suffix'
)
as
$key
)
{
$previous
[
$key
]
=
isset
(
$elements
[
$key
])
?
$elements
[
$key
]
:
NULL
;
}
// If we rendered a single element, then we will skip the renderer.
if
(
empty
(
$children
))
{
$elements
[
'#printed'
]
=
TRUE
;
...
...
@@ -2773,7 +2778,12 @@ function drupal_render(&$elements) {
$elements
[
'#markup'
]
=
''
;
}
unset
(
$elements
[
'#prefix'
],
$elements
[
'#suffix'
]);
$content
=
theme
(
$elements
[
'#theme'
],
$elements
);
foreach
(
array
(
'#type'
,
'#prefix'
,
'#suffix'
)
as
$key
)
{
$elements
[
$key
]
=
isset
(
$previous
[
$key
])
?
$previous
[
$key
]
:
NULL
;
}
}
// Render each of the children using drupal_render and concatenate them.
if
(
!
isset
(
$content
)
||
$content
===
''
)
{
...
...
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