Opened 21 months ago
Closed 18 months ago
#18467 closed task (blessed) (fixed)
Redirect to About WordPress page after upgrade
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | Upgrade/Install | Version: | 3.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | mike.schroder@…, allstruck, info@… |
Description
When the plugins and themes are upgraded, there's a helpful menu option to "Go To WordPress Updates Page". This is a very useful link as it allows me to get back to the updates page easily. The core upgrade, though, doesn't have such a link (only Go To Dashboard). I often update a site and it's a two (or three) step process, updating core, plugins, and themes. It would be helpful if the updates link appeared on core updates as well.
Proposed Code Change, wp-admin/update-core.php, line 65.
Old Code
show_message( '<a href="' . esc_url( self_admin_url() ) . '">' . __('Go to Dashboard') . '</a> ' );
New Code:
show_message( '<a href="' . esc_url( self_admin_url() ) . '">' . __('Go to Dashboard') . '</a> | <a href="' . self_admin_url('update-core.php') . '" title="' . esc_attr__('Go to WordPress Updates page') . '" target="_parent">' . __('Return to WordPress Updates') . '</a>' );
Link copied from wp-admin/includes/class-wp-upgrader.php line 1202
Attachments (9)
Change History (52)
SergeyBiryukov — 21 months ago
comment:1
SergeyBiryukov — 21 months ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.3
- Type changed from enhancement to task (blessed)
@nacin: Do you actually mean "linking from the new about.php screen"? I'll have @chexee add a back-to-updates link from about.php next to the Dashboard link. She's patching it right now and will post to #18742. One thing though -- prob need a snippet to check for permissions since we're showing about.php to everyone, not just people with update caps, yeah?
- Owner set to ocean90
- Status changed from new to assigned
No, I mean linking and/or redirecting from the core update to about.php.
18467.2.patch
Because a PHP redirect isn't possible (header already sent output) we need some Javascript magic here. Jane and rboren are fine with this.
- I added a simple function which hooks into admin_footer-update-core.php
- On success WP returns a link to dashboard, which can be checked via Javascript
- If link is there redirect too admin_url( 'about.php?afterupgrade=1' )
- Summary changed from Standardize Language on Core Update to Redirect to About WordPress page after upgrade
comment:10
nacin — 18 months ago
In [19441]:
comment:11
nacin — 18 months ago
In [19442]:
comment:12
nacin — 18 months ago
Leaving open to see if there is a hook we can abuse for a link that can work without JS, and other minor tweaks (discussed in IRC).
Cleared for beta 4.
comment:13
DH-Shredder — 18 months ago
Had a discussion with a tester on IRC that was confused by the behavior, because during a browser lag, they attempted to click the "Go to Dashboard" link after upgrade, and the browser then redirected to about.php (making it look like the link pointed to about.php).
In this case, at least, the PHP redirect would have been helpful.
If we only want users to continue to the Welcome/about page in this case, the link could also potentially be changed to match the behavior that would otherwise happen with the redirect.
comment:14
DH-Shredder — 18 months ago
- Cc mike.schroder@… added
comment:15
allstruck — 18 months ago
- Cc allstruck added
@nacin:
How about leaving the auto-redirect with JS, and rewriting that link to the dashboard in a more explanatory way.
e.g.:
You should be redirect to LINK automatically.
Agreeing with DH-Shredder, the link should match the redirect. And unless there's going to be a lag between the redirect no other links seem necessary.
Agreeing with OP (sparkweb) as well, it would be nice to have the ability to link elsewhere. I would propose rather than adding links that an option be created to override the location (for both the link and redirect.)
comment:16
sparkweb — 18 months ago
My two cents is that power users will be annoyed at always being redirected away to an informational screen. I think it would be better to have the list of links - maybe a button inviting new users to find out what's new in 3.3.
comment:17
jane — 18 months ago
I would rather the redirect. It's pretty common in open source software to get that kind of screen after an update. See Thunderbird, Mozilla, etc. Power user or not, an orientation to what's about to be different is useful.
comment:18
allstruck — 18 months ago
I have to agree with jane... might there be room for links to "what you might want to do now" on the about page?
What would you think of that sparkweb?
comment:19
sparkweb — 18 months ago
@allstruck: I'd be okay with that. I just want an easy way to continue with my updates if that's the path I want to take.
comment:20
sparkweb — 18 months ago
Just installed 3.3 beta 4 and I like the new welcome screen a lot. I think my only request would be to have the "Return to Dashboard" links on the bottom be available at the top of the page as well so scrolling to the bottom wouldn't be required.
comment:21
nacin — 18 months ago
- Owner changed from ocean90 to nacin
- Status changed from assigned to accepted
I've got further tweaks planned for this prior to RC1. The links and redirect will be polished a bit.
comment:22
ocean90 — 18 months ago
allstruck: Please have in mind, that new strings can't be translated by WordPress < 3.3, without reloading the language files.
wp-admin/includes/update-core.php is the only file, which will be replaced during the upgrade and included again.
comment:23
follow-up:
↓ 26
jane — 18 months ago
@nacin: What tweaks were you thinking of doing?
I don't want to mar the page with links at the top. The regular navigation already provides access to the main Dashboard by way of the ever-present admin menu. Adding another link to Dashboard at top of screen would be repetitive and cluttering. That point also addresses @allweb's suggestion. We don't need a bunch of 'what do you want to do now' links -- they can get anywhere with a single click already using the left nav.
comment:24
ocean90 — 18 months ago
I think reloading the textdomain could bring us some nice improvments. We can add a info what is happing and maybe show a link for no-js.
// Load the default text localization domain.
unload_textdomain( 'default' ) ;
$locale = get_locale();
load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" );
comment:25
ocean90 — 18 months ago
18467.3.patch is another approach.
- We can add an action in update_core named _core_updated_successfully
- Now we can hook into it and do some magic.
comment:26
in reply to:
↑ 23
nacin — 18 months ago
Replying to jane:
@nacin: What tweaks were you thinking of doing?
I don't want to mar the page with links at the top. The regular navigation already provides access to the main Dashboard by way of the ever-present admin menu. Adding another link to Dashboard at top of screen would be repetitive and cluttering. That point also addresses @allweb's suggestion. We don't need a bunch of 'what do you want to do now' links -- they can get anywhere with a single click already using the left nav.
@Jane, only referring to links like 'Go to Dashboard' on the core update itself. Nothing more on the About page.
comment:27
nacin — 18 months ago
- Keywords has-patch added; needs-patch removed
I didn't see ocean90's comments or patches until now. Nice work. :)
I will test this out, but it's very close to what I was going to try to do. Probably better.
comment:28
follow-up:
↓ 29
duck_ — 18 months ago
If we hook into update_core() we could remove the version_compare() on $GLOBALS['wp_version']. Currently we will have to update the comparison number every version.
comment:29
in reply to:
↑ 28
nacin — 18 months ago
Replying to duck_:
If we hook into update_core() we could remove the version_compare() on $GLOBALS['wp_version']. Currently we will have to update the comparison number every version.
I think ocean90's idea was that this would be for 3.3 only and we would make it less hacky now, to apply for 3.3+.
comment:30
ocean90 — 18 months ago
Nacin is right. We should place the same (more or less) in do_core_upgrade().
comment:31
ocean90 — 18 months ago
One point for about.php "Return to Dashboard → Updates" isn't the right string for multisite, IMO.
comment:32
nacin — 18 months ago
- Debug Code — Includes debugging code. Specifically, the window.location bits are commented out and files are not copied. This means your install will not be overridden with the nightly, and your in situ wp-admin/includes/update-core.php will be used.
- Includes no-JS support – namely, a separate string. The no-JS string looks like this:
Welcome to WordPress %1$s. You will be redirected to the About WordPress screen. If not, click <a href="%s">here</a>.
- The with-JS string looks like this:
Welcome to WordPress %1$s. <a href="%2$s">Learn more</a>.
- As discussed with ocean90 and duck_, I made it so _redirect_to_about_wordpress() only fires when the current install is < 3.3. Once the install is 3.3, the new strings will be in the POT file, and the new code will be in place in wp-admin/update-core.php.
- I needed to alter the return of wp_update_core() to include the *new* version number, otherwise I couldn't do the previous bullet point. This makes me second-guess the previous bullet point as unnecessary.
- In multisite, about.php?updated now links back to the network/update-core.php file.
Thoughts?
comment:33
nacin — 18 months ago
- Resolution set to fixed
- Status changed from accepted to closed
In [19524]:
comment:34
nacin — 18 months ago
In [19527]:
comment:35
nacin — 18 months ago
In [19529]:
comment:36
nacin — 18 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
Variable collision and leftover debug.
comment:37
ryan — 18 months ago
Looks good.
comment:38
nacin — 18 months ago
- Resolution set to fixed
- Status changed from reopened to closed
In [19532]:
comment:39
ocean90 — 18 months ago
- Resolution fixed deleted
- Status changed from closed to reopened
comment:40
ryan — 18 months ago
Looks good.
comment:41
nacin — 18 months ago
- Resolution set to fixed
- Status changed from reopened to closed
In [19535]:
comment:42
toscho — 18 months ago
- Cc info@… added
- Resolution fixed deleted
- Status changed from closed to reopened
After some tests I strongly suggest not to redirect if there are still plugins waiting for an update. In this case there is no time to read the about page anyway, and the extra click back to the update page is just wasting time.
comment:43
nacin — 18 months ago
- Resolution set to fixed
- Status changed from reopened to closed
You may open a new ticket, but I assume it will be closed quickly. For a user, the about page is not a waste of time. Plugins can wait 5-10 minutes.

I'm hijacking this ticket so we can implement redirection/linking to the new about.php screen.