Make WordPress Core

Opened 16 years ago

Closed 15 years ago

#9303 closed defect (bug) (fixed)

Plugin updater does not show plugin messages after bulk actions are applied.

Reported by: jwriteclub's profile jwriteclub Owned by: dd32's profile DD32
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7.1
Component: Plugins Keywords: has-patch commit
Focuses: Cc:

Description

After applying a bulk delete action, the messages (such as update notices) below plugins are not displayed.

Attached are two images of a plugin update screen before and after a plugin was deleted with the "bulk delete". Note that the number next to plugins in the main menu has not changed, nor has the version number of the plugin in question.

Firefox 3.0.7 (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729))

Woirdpress 2.7.1 with MySQL 4.2 and PHP 5

Attachments (5)

bulk-action-before.jpg (171.2 KB) - added by jwriteclub 16 years ago.
The plugin interface before the bulk action is applied
bulk-action-after.jpg (171.9 KB) - added by jwriteclub 16 years ago.
The plugin interface after the bulk action is applied
9303.diff (495 bytes) - added by DD32 15 years ago.
9303.patch (937 bytes) - added by hakre 15 years ago.
managed transient
9303.2.diff (616 bytes) - added by Denis-de-Bernardy 15 years ago.
based on DD32's suggestion

Download all attachments as: .zip

Change History (18)

@jwriteclub
16 years ago

The plugin interface before the bulk action is applied

@jwriteclub
16 years ago

The plugin interface after the bulk action is applied

#1 @FFEMTcJ
16 years ago

  • Keywords needs-patch added; bulk action update message removed
  • Milestone changed from Unassigned to 2.7.2

#2 @Denis-de-Bernardy
15 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

merging into #7875

#3 @DD32
15 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

I'm going to leave this separate Denis, It sounds like the update is being deleted, and not checked before the page is displayed..

Its not really an issue with the upgrader process

#4 @DD32
15 years ago

  • Owner set to DD32
  • Status changed from reopened to new

Assigning to Self for testing, and to remind myself of this ticket

#6 in reply to: ↑ description @hakre
15 years ago

  • Keywords plugins needs-patch removed
  • Resolution set to wontfix
  • Status changed from new to closed

Replying to jwriteclub:

After applying a bulk delete action, the messages (such as update notices) below plugins are not displayed.

after applying a bulk action, there is no need to see update messages for certain plugins. this is a feature of the standard listing and not of the return-page after bulk things have been done.

#7 @DD32
15 years ago

  • Keywords has-patch added
  • Resolution wontfix deleted
  • Status changed from closed to reopened

Re-opening due to it being a bug due to bad timing of update checks.

The issue is this:

  • Updates are available
  • Init is fired, as well as load-plugins.php, this is the hook the update check runs on
  • Bulk Action applied (Delete)
    • Deletion occurs
    • Deletion removes the update_plugins transient
  • Page continues to load (Not redirect like most other actions)
  • Plugins listing is shown
    • Plugin update row item is called, however transient is empty since an update check hasnt run since the transient was deleted after the bulk action was applied.

I dont think the transient needs to be deleted after a plugin deletion, So what if theres a old stale plugin in the transient for a few hours?(that is NOT going to be shown) Its not going to affect performance much..

Patch coming up in just a minute.

#8 @DD32
15 years ago

  • Milestone changed from 2.7.2 to 2.8

2.8 since release of 2.8 is so close.

@DD32
15 years ago

#9 @hakre
15 years ago

class WP_Upgrader has that code as well.

@hakre
15 years ago

managed transient

#10 @hakre
15 years ago

I extended the patch a bit to just reflect the deleted plugin(s). This might help with re-installations of plugins.

#11 @DD32
15 years ago

class WP_Upgrader has that code as well.

For a reason.

The workflow for a plugin upgrade is completely different, and the update cache needs to be invalidated upon a plugin upgrade to prevent showing the upgrade message again.

I thought about simply modifying the transient, but, That didnt seem like a useful thing..

..Actually, It just occured to me, Yes, A bad cache IS A bad thing, the update count bubble will not update correctly.

I'd change that code i deleted to this:

 if ( $current = get_transient('update_plugins') ) { 
    unset( $current->response[ $plugin_file ] );
    set_transient('update_plugins', $current);
 }

Seems like a better approach than your patch(Less code branches modified), but still achieves the same result.

@Denis-de-Bernardy
15 years ago

based on DD32's suggestion

#12 @Denis-de-Bernardy
15 years ago

  • Keywords commit added

commit? wontfix?

#13 @ryan
15 years ago

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

(In [11207]) Fix display of plugin update messages after bulk ops. Props DD32. fixes #9303

Note: See TracTickets for help on using tickets.