Make WordPress Core

Opened 19 months ago

Last modified 17 months ago

#56292 new defect (bug)

Auto-update option gets enabled for plugins not hosted on WordPress.org

Reported by: patilvikasj's profile patilvikasj Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.5
Component: Plugins Keywords: reporter-feedback
Focuses: Cc:

Description

The option to Enable Auto-update only appears to those plugins ( Referring to plugins NOT hosted on WordPress.org ) if a version update is available for that plugin.

Also, if the user does bulk action auto-updates from the plugins page, auto-update gets enabled for all the plugins, including those not hosted on WordPress.org, only when an update is available for those plugins.

Is this expected behavior? If auto-update is supported for Non-WP.org plugins, those options should always be available for all plugins, irrespective of whether they are hosted on WordPress.org or Not.

Attachments (1)

screenshot-from-patilvikasj.jpg (261.1 KB) - added by costdev 19 months ago.
Attaching screenshot from @patilvikasj in case the link 404s in the future.

Download all attachments as: .zip

Change History (12)

#1 @audrasjb
19 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.1
  • Version changed from 6.0 to 5.5

Hello and welcome back to WordPress Core Trac, @patilvikasj,

This is a valid point that need to be fixed.
I think we could first make sure that non-dotorg plugins auto-updates are not toggled using bulk actions.

Then we could probably open a follow-up ticket to consider activating auto-updates for them :)

Moving for 6.1 consideration.

#2 @afragen
19 months ago

If non-dot org plugins are showing an update and are able to be auto-updated, it is the plugin developer and/or the updating code they are using that allows this to occur.

It shouldn't be within core. You would need to explain which plugin you're seeing this for to better understand this.

#3 @patilvikasj
19 months ago

@afragen I have been able to reproduce this issue with the following Non-dot org plugins.
Astra Addon, Elementor Pro, Rank Math SEO Pro, Presto Player Pro. All these plugins are from different authors.

#4 @afragen
19 months ago

Any chance you could post a screenshot of your plugins.php page?

#5 @patilvikasj
19 months ago

@afragen Here is a screenshot of my plugins.php page - https://bit.ly/3JleWUz
You can see Pro plugins also have the option to enable Auto-updates.

@costdev
19 months ago

Attaching screenshot from @patilvikasj in case the link 404s in the future.

#6 @desrosj
17 months ago

  • Keywords reporter-feedback added; needs-patch removed
  • Milestone changed from 6.1 to Awaiting Review

As far as I can tell, these are all premium plugins, which we don't have access to look at how they work.

As stated above, if non-dot org plugins are showing an update and are able to be auto-updated, it is the plugin developer and/or the updating code they are using that allows this to occur.

But, I'm also a little confused by the report.

The option to Enable Auto-update only appears to those plugins ( Referring to plugins NOT hosted on WordPress.org ) if a version update is available for that plugin.

Are you saying that the link to Enable auto-updates is not visible when the plugin is up to date? So if you update one of those plugins, the option to toggle auto-updates for that plugin disappear?

Also, if the user does bulk action auto-updates from the plugins page, auto-update gets enabled for all the plugins, including those not hosted on WordPress.org, only when an update is available for those plugins.

Can you provide exact steps so someone else can see what is happening? As I understand it:

  • select all plugins
  • select enable auto-updates
  • submitting when there are updates available turns on auto-updates for all plugins, but submitting when non-.org plugins are up to date (no updates) does not turn that on?

So far, I don't see anything that indicates a problem in Core. It's likely that the code within these plugins is missing something required to ensure the toggle is always shown.

I'm moving this back to Awaiting Review as the problem is not yet clear.

#7 @peterwilsoncc
17 months ago

For Distributor, 10up needed to include the no_update property to enable to toggle when no updates are available. I am not sure if it's a bug or a feature but it's possible for non-wordpress.org hosted plugins to display the option at all times.

Ref: Distributor source code

#8 @afragen
17 months ago

@peterwilsoncc I do the same with Git Updater. https://github.com/afragen/git-updater/blob/2afecc87de3c3c81bde9fe3a1c2380cc8616a279/src/Git_Updater/Plugin.php#L452

I think the OP expects that if some devs specifically add this feature then it should work regardless of whether it’s added or not. I don’t think there is understanding that this specifically needs to be added for plugins that aren’t in dot org.

This is not a core bug and I think can be closed as invalid.

#9 @peterwilsoncc
17 months ago

@afragen It does seem odd for Core to display the toggle in some circumstances but not the other.

To clarify my comment around bug or feature:

  • I think it a bug that it displays sometimes
  • I am not sure if it's a feature or bug that non w.org plugins need to opt in to enabling the toggle.

#10 @afragen
17 months ago

It’s a bug if those non-dot org plugins display the auto-update option if they haven’t specifically accounted for it.

It all depends upon how the non-dot org plugin updates and if that update process provides for placing a plugin that doesn’t have an update available into the no-update part of the update transient.

Because non-dot org plugins provide their own update mechanism it’s all on them.

#11 @afragen
17 months ago

It’s a feature that with the proper coding non-dot org plugins may opt in to auto-updates.

Note: See TracTickets for help on using tickets.