WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#19280 closed enhancement (duplicate)

Admin bar not displaying until after plugin upgrades/updates/installations are complete

Reported by: griffinjt Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.1
Component: Toolbar Keywords:
Focuses: Cc:

Description

Couldn't find a ticket for this. The admin bar doesn't display until after any updates, upgrades or installations using plugins_api are complete. It's not terribly important, but it does look odd having blank space there during the process. I've only tested this with plugins, could be the same with core upgrades as well.

Change History (7)

#1 @nacin
9 years ago

Yeah, this has been a problem since 3.1 I believe. The issue is that the admin bar is rendered at the bottom of the page.

We *could* bump rendering to the top on select pages. I don't think it'd break much. The JS wouldn't work though (not that we'd want it to).

Eventually updates should be standardized to occur in an iframe, but it's a challenge.

#2 @nacin
9 years ago

  • Component changed from Upgrade/Install to Admin Bar
  • Version changed from 3.3 to 3.1

#3 @griffinjt
9 years ago

Just thinking out loud - maybe it would be possible to bump loading to the top only when certain things are active (like WP_Filesystem, which would get touched anytime updates/upgrades occur). Not even sure if its feasible, but it's my first thought. It may be too late, but just a thought.

#4 @griffinjt
9 years ago

Just tested this on the plugin install page for my automatic plugin activation class and there were no issues with moving the admin bar to the header within a method hooked into init. Admin bar displayed fine and worked fine as well. I can't say it will do this for all pages, but for now I'm happy. :)

It just looks like this:

if ( $this->is_tgmpa_page() ) {
	remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
        remove_action( 'admin_footer', 'wp_admin_bar_render', 1000 );
	add_action( 'wp_head', 'wp_admin_bar_render', 1000 );
	add_action( 'admin_head', 'wp_admin_bar_render', 1000 );
}

I didn't see any issues when testing it on other pages like plugins.php, but it was just a cursory review.

#5 @dd32
9 years ago

Note, This is only a problem for Singular Plugin upgrades and Plugin Installs, as bulk upgrades utilise a iframe for the actual process.

There was talk at one stage of pushing all the actions into an iframe.

(What applies to Plugins applies to Themes too)

#6 @nacin
9 years ago

Closing as a duplicate of a more comprehensive ticket: #20161.

#7 @helenyhou
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.