Opened 8 years ago
Closed 7 years ago
#2587 closed defect (bug) (fixed)
Update browse-happy
Reported by: | azaozz | Owned by: | Otto42 |
---|---|---|---|
Milestone: | Priority: | high | |
Component: | API | Keywords: | has-patch commit |
Cc: |
Description
Follow up from https://core.trac.wordpress.org/ticket/40165.
MS discontinued support for IE8, 9, 10 more than a year ago so these versions can be considered "insecure". We need to update the warnings shown on the Dashboard. They are coming from https://meta.trac.wordpress.org/browser/sites/trunk/api.wordpress.org/public_html/core/browse-happy.
Attachments (2)
Change History (11)
#3
follow-up:
↓ 4
@
7 years ago
- Priority changed from normal to high
A user of IE9 or IE10, right now, cannot use the visual editor at all. But they get no message on their dashboard telling them that their browser is unsupported/outdated.
I'm going to bump the priority up if nobody minds as these users will have no idea why WordPress has stopped working for them.
What's needed to move this ticket along? Is there anything I can do to help?
#4
in reply to:
↑ 3
;
follow-up:
↓ 5
@
7 years ago
Replying to tomdxw:
What's needed to move this ticket along?
To find someone to review 2587.patch :)
#5
in reply to:
↑ 4
;
follow-up:
↓ 6
@
7 years ago
I had a look at the patch, and I noticed one issue.
IE9 is marked as insecure
, but it's not marked as upgrade
:
% php -r '$_SERVER["HTTP_USER_AGENT"]="Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)";require("test.php");' Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)<br/><br/>platform = Windows<br/>name = Internet Explorer<br/>version = 9.0<br/>update_url = http://www.microsoft.com/windows/internet-explorer/<br/>img_src = http://s.wordpress.org/images/browsers/ie.png<br/>img_src_ssl = https://wordpress.org/images/browsers/ie.png<br/>current_version = 9<br/>upgrade = 0<br/>insecure = 1<br/>
But in WordPress, if upgrade
is set to 0
, then it won't produce any warning, even if insecure
is set to 1
(wp-admin/includes/dashboard.php
line 29):
$response = wp_check_browser_version(); if ( $response && $response['upgrade'] ) { add_filter( 'postbox_classes_dashboard_dashboard_browser_nag', 'dashboard_browser_nag_class' ); if ( $response['insecure'] ) wp_add_dashboard_widget( 'dashboard_browser_nag', __( 'You are using an insecure browser!' ), 'wp_dashboard_browser_nag' ); else wp_add_dashboard_widget( 'dashboard_browser_nag', __( 'Your browser is out of date!' ), 'wp_dashboard_browser_nag' ); }
We just need to change 9
to 11
here, and it will produce the correct output:
function get_browser_current_versions() { return array( 'Chrome' => '18', // Lowest version at the moment (mobile) 'Firefox' => '16', 'Opera' => '12.11', 'Safari' => '5', 'Internet Explorer' => '9', // Left at 9 until Windows 7 adopts 10 ); }
#6
in reply to:
↑ 5
@
7 years ago
Replying to tomdxw:
We just need to change
9
to11
here, and it will produce the correct output
Good catch! Updated the patch: 2587.2.patch.
In 2587.patch
tests.php
file to PHPUnit tests, which appears to be the preferred way in newer projects like the Plugin Directory plugin.Note that there are currently 5 known failures, same as in the current
tests.php
file, that should be addressed in another ticket: