Make WordPress Core

Opened 15 years ago

Closed 12 years ago

#13860 closed defect (bug) (fixed)

Twenty Ten: Odd CSS rule messes with password protected form for galleries

Reported by: nacin's profile nacin Owned by: iandstewart's profile iandstewart
Milestone: WordPress.org Priority: normal
Severity: trivial Version: 3.0
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description (last modified by nacin)

Create a password protected post in the gallery category. On the home page, you'll get the form attempting to appear on the same line as the warning text due to:

.home #content .category-gallery .entry-content p {
    display: inline;
}

Screenshot attached. Originally reported by zeo.

Not sure what the CSS rule is for, but wontfix seems fine to me if it should stay.

The other outcome to this ticket I see as possible is it seems that post_class() deserves some post_password_required() love, in order to target this properly.

Attachments (3)

13860.png (25.8 KB) - added by nacin 15 years ago.
13860.diff (589 bytes) - added by zeo 15 years ago.
13860-post-class-post-password.diff (634 bytes) - added by zeo 15 years ago.
Add class post-password to post_class(). Also fix minor typo.

Download all attachments as: .zip

Change History (18)

@nacin
15 years ago

#1 @nacin
15 years ago

  • Description modified (diff)

@zeo
15 years ago

#2 @zeo
15 years ago

  • Owner set to iammattthomas
  • Priority changed from lowest to normal
  • Status changed from new to assigned

It's never a good idea to change p element to be inline. There are a couple more scenario to prove that. For example if a plugin or theme tries hook something to the_content or the_excerpt it will be inline along with the content summary.

There are 2 ways to fix this:

1) Delete the rule. see 13860.diff
2) Create a custom filter for the_content() and the_excerpt() to add "This gallery contains n photos." in-line with the original content.

#3 @zeo
15 years ago

The patch also change:

#content .gallery {
	margin: auto;
}

to:

#content .gallery {
	margin: 0 auto 18px;
}

where it will add margin bottom to gallery div with the same value as p. Currently there's no gap at the end of gallery div.

#4 @zeo
15 years ago

  • Keywords has-patch added

@zeo
15 years ago

Add class post-password to post_class(). Also fix minor typo.

#5 @zeo
15 years ago

  • Owner changed from iammattthomas to iandstewart

#6 @iandstewart
15 years ago

The Twenty Ten functions.php is already complicated enough. I think deleting the rule that keeps "This gallery contains n photos" inline with the excerpt is the way to go. This'll be in 1.0.2 in the directory (along with the bottom margin on galleries).

#7 @iandstewart
15 years ago

Needs dev-feedback for 13860-post-class-post-password.diff

#8 @nacin
15 years ago

  • Milestone changed from WordPress.org site to 3.1

Kicking this to 3.1 for the post_class patch, which looks good.

#9 @westi
14 years ago

  • Cc westi added
  • Milestone changed from Awaiting Triage to 3.1

#10 @westi
14 years ago

(In [16138]) Add a post class if a password is required for the post to be displayed. See #13860 props zeo.

#11 @markmcwilliams
14 years ago

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

Looks fixed to me, but tell me off if it's not! ;)

#12 @nacin
14 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Twenty Ten still needs to take advantage of the new class, I believe.

#13 @nacin
14 years ago

  • Milestone changed from 3.1 to WordPress.org

#14 @SergeyBiryukov
13 years ago

  • Component changed from Themes to Bundled Theme

#15 @obenland
12 years ago

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

Bug was fixed with [15397].

Note: See TracTickets for help on using tickets.