Make WordPress Core

Opened 12 years ago

Last modified 3 months ago

#28117 new defect (bug)

Admin bar shouldn't use dynamic styles on frontend for logged out visitors

Reported by: dimadin Owned by:
Priority: normal Milestone: Awaiting Review
Component: Toolbar Version: 3.3
Severity: normal Keywords: has-patch needs-test-info has-unit-tests
Cc: Focuses: administration

Description

Admin bar gets styles depending on current user's browser. Problem is that when you using admin bar on front end for logged out users with full page cache turned on, visitor with IE or mobile might be the first one so everyone else with get that specific style.

See #26221 for similar problem.

Attachments (2)

28117.patch (1.1 KB ) - added by dimadin 12 years ago.
28117.1.patch (554 bytes ) - added by sabernhardt 5 years ago.

Download all attachments as: .zip

Change History (15)

@dimadin
12 years ago

#1 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review4.0

#2 @toscho
12 years ago

That’s a general problem in WordPress: a header Vary: User-Agent is never set when the output depends on the user agent.

#3 @obenland
12 years ago

  • Keywords has-patch added
  • Version3.3

This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.


12 years ago

This ticket was mentioned in IRC in #wordpress-dev by DrewAPicture. View the logs.


12 years ago

#6 @DrewAPicture
12 years ago

  • Milestone 4.0Future Release

As this is not a regression, let's take a look at this in 4.1. Punting.

#7 @chriscct7
11 years ago

  • Focuses administration added

@sabernhardt
5 years ago

#8 @sabernhardt
5 years ago

  • Keywords needs-testing added

28117.1.patch refreshes the conditional statement (Internet Explorer classes were removed in changeset 47771).

Also, I removed the nojq class from the PHP because the script no longer removes it.

#9 @sabernhardt
5 years ago

  • MilestoneAwaiting Review

#10 @sabernhardt
5 years ago

  • Keywords needs-testing-info added

28117.1.patch still applies, but I have not tested it properly with a caching plugin.

A good testing procedure could help, and below is a basic outline (I'm sure I have missed something):

  • Before applying the patch, we would want to set up page caching, then visit on a mobile device and verify the 'mobile' class is used, then visit again on a desktop and see that the class is still there.
  • After applying the patch, purge the cache, then visit on mobile again to save the mobile version, and visit on a desktop to verify that it does not show the mobile version.

#11 @wordpressdotorg
15 months ago

  • Keywords needs-test-info added; needs-testing-info removed

#12 @huzaifaalmesbah
7 months ago

  • Keywords needs-refresh added; needs-testing removed

I attempted to apply the patch (28117.1.patch) against trunk (7.0-alpha-61215-src).

The patch does not apply cleanly:

  • src/wp-includes/class-wp-admin-bar.php (hunk failed)

Since the patch cannot be applied, the changes cannot be tested at this time.

Removing needs-testing, and adding needs-refresh. It needs to be rebased for current trunk before testing or review.

This ticket was mentioned in PR #11729 on WordPress/wordpress-develop by @sukhendu2002.


3 months ago
#13

  • Keywords has-unit-tests added; needs-refresh removed
Note: See TracTickets for help on using tickets.