Skip to content

Admin bar 'Purge Cache' button disappears after updating to 2.3.4 #431

@mrrobot47

Description

@mrrobot47

As an administrator, the "Purge Cache" button in the WordPress admin bar is no longer visible after updating the Nginx Helper plugin to the latest version (2.3.4).

This issue appears to have been introduced in Pull Request #420, where the permission check for displaying the button was changed from the general manage_options capability to a more specific Nginx Helper | Purge cache capability.

While this new capability is correctly added to the 'administrator' role upon a fresh activation of the plugin, it seems this logic is not triggered during the update process. As a result, administrators who update the plugin lose access to the button because their role doesn't have the newly required permission.

Workaround:
Deactivating and then reactivating the plugin successfully restores the "Purge Cache" button, as this process re-runs the activation hook that grants the necessary capability.

Suggested Solution:
An update routine should be added to ensure that the Nginx Helper | Purge cache capability is granted to the administrator role during the plugin update process, not just on activation.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions