WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#24058 closed defect (bug) (invalid)

Extra closing div in wordpress gallery

Reported by: charliejlryan Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5.1
Component: Gallery Keywords:
Focuses: Cc:

Description

WordPress 3.5.1 bug - error on line 800 /wp-includes/media.php un-opened "</div>" causes theme problems when using [gallery] shortcode.

Solution: Change lines 798 - 800 from:

$output .= "

<br style='clear: both;' />

</div>\n";

To:

$output .= "

<br style='clear: both;' />";

Change History (2)

comment:1 follow-up: @SergeyBiryukov2 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

There's an opening <div> tag in line 775:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/media.php#L775

Your theme or some plugin is probably hooking into the gallery_style filter in line 776 without adding the opening tag.

comment:2 in reply to: ↑ 1 @charliejlryan2 years ago

Replying to SergeyBiryukov:

There's an opening <div> tag in line 775:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/media.php#L775

Your theme or some plugin is probably hooking into the gallery_style filter in line 776 without adding the opening tag.

Ah, you are correct, thanks Sergey

Note: See TracTickets for help on using tickets.