WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 4 weeks ago

Last modified 3 weeks ago

#42604 closed defect (bug) (fixed)

Problem: alignment of image with caption

Reported by: slilley Owned by: obenland
Milestone: 5.0 Priority: normal
Severity: normal Version: 4.9
Component: Bundled Theme Keywords:
Focuses: Cc:

Description

Using Twenty-Ten them, if you put an image in a post, give it a caption and align it "none", the image should remain default-left aligned, with a small frame, and no text wrap.

After WP 4.9, that same image will now appear centered in the post, with a frame (and caption) that extends the full width of the post.

Attachments (4)

pre_4_9.jpg (160.2 KB) - added by slilley 3 months ago.
display, pre-WP4.9
post_4_9.jpg (164.7 KB) - added by slilley 3 months ago.
display within WP4.9
shortcaption.jpg (156.1 KB) - added by slilley 3 months ago.
Screen Shot 2018-01-18 at 12.14.png (718.2 KB) - added by slilley 4 weeks ago.

Download all attachments as: .zip

Change History (20)

@slilley
3 months ago

display, pre-WP4.9

@slilley
3 months ago

display within WP4.9

#1 follow-up: @hardeepasrani
3 months ago

  • Component changed from General to Themes

I think I found the issue in the theme, but I'm just wondering if the Twenty Ten theme is still being maintained?

#2 @hardeepasrani
3 months ago

  • Component changed from Themes to Bundled Theme

#3 in reply to: ↑ 1 @slilley
3 months ago

Replying to hardeepasrani:

I think I found the issue in the theme, but I'm just wondering if the Twenty Ten theme is still being maintained?

Yes, Twenty Ten theme has been updated.

#4 follow-up: @Clorith
3 months ago

  • Component changed from Bundled Theme to Media
  • Milestone changed from Awaiting Review to 4.9.2

Introduced in r41724

The use of max-width on the container lets the wp-caption-text cause it to overflow for some reason, providing a max-width that mimics the parents max width might be an idea (so far only observed on themes that do not have HTML5 support, so it might be something there)

#5 in reply to: ↑ 4 @slilley
3 months ago

Even if the caption is short (i.e. narrower than the image), the shaded frame still goes wide.

Replying to Clorith:

Introduced in r41724

The use of max-width on the container lets the wp-caption-text cause it to overflow for some reason, providing a max-width that mimics the parents max width might be an idea (so far only observed on themes that do not have HTML5 support, so it might be something there)

@slilley
3 months ago

#6 @obenland
2 months ago

  • Component changed from Media to Bundled Theme
  • Owner set to obenland
  • Status changed from new to accepted

#7 @obenland
2 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 42386:

Twenty Ten: Use global img contraint for captions

Fixes an incompatibility with the way caption width is set since 4.9, where the caption element would cover the whole content width.

Props slilley, Clorith, hardeepasrani.
Fixes #42604.

#8 @slilley
5 weeks ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

I still see the same problem on my end. Not fixed yet.

#9 follow-up: @obenland
5 weeks ago

@slilley Do you have a public test site that I can access with the fix not working. Does it still occur for anyone else?

#10 @Clorith
5 weeks ago

Patch is good on my end.

Just a note for those still experiencing this issue, this is prepared for version 4.9.2, which has not been released yet, so you won't see any change unless you are using the beta tester plugin or any other method of testing the new release.

#11 @dd32
5 weeks ago

  • Milestone changed from 4.9.2 to 4.9.3

Bumping to 4.9.3 due to 4.9.2s release

This ticket was mentioned in Slack in #core by desrosj. View the logs.


5 weeks ago

#13 in reply to: ↑ 9 @slilley
4 weeks ago

Replying to obenland:

@slilley Do you have a public test site that I can access with the fix not working. Does it still occur for anyone else?

Sure — here's an example on a page from my site:
http://recklesslistening.com/2010/03/26/greeting-card-emergency/

I'm running WP 4.9.2, and using a child theme of Twenty-Ten 2.4. And I still get the problem even when I switch from my child theme into straight Twenty-Ten 2.4.

#14 @obenland
4 weeks ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Yeah, your version of Twenty Ten doesn't have [42386] applied, it still forcibly sets the caption width to the full content width. Once that's updated, it'll be fixed.

This ticket was mentioned in Slack in #core by clorith. View the logs.


3 weeks ago

#16 @SergeyBiryukov
3 weeks ago

  • Milestone changed from 4.9.3 to 5.0

Moving to 5.0, as bundled themes are generally updated with major releases.

Note: See TracTickets for help on using tickets.