WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#8129 closed defect (bug) (fixed)

Plugin Updater detects wrong "Latest Version installed"

Reported by: pampfelimetten Owned by:
Milestone: 2.7 Priority: normal
Severity: major Version: 2.7
Component: Plugins Keywords: has-patch
Focuses: Cc:

Description

I'm using 2.7-beta2 and trying to use the new backend plugin installer functions, and discovered a bug: If I have an empty folder with the name of the plugin I want to install, I get the message "Latest Version Installed" instead of the install link.

I got to this point due to installation problems with the error "Could not create directory", so I though I could just create the directory on my own - but then, no install link =(.

Its reproducible and applies to all plugins.

(Second, didn't manage to install new plugins over the admin interface at all, although upgrading already installed plugins works flawless. Have tested it with file permissions 755 and 777)

Attachments (1)

8129.diff (2.6 KB) - added by DD32 6 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 follow-up: @DD326 years ago

Yes, Checking to see if the plugin is currently installed isnt exactly easy, I think I might replace that check with another option thats available, And actually check to see if a plugin exists in the folder (as well as the folder existing)

Have tested it with file permissions 755 and 777)

Was it using the FTP method? (ie. it asked for ftp credentials) or direct (no questions asked, just straight install)?

comment:2 in reply to: ↑ 1 @pampfelimetten6 years ago

Have tested it with file permissions 755 and 777)

Was it using the FTP method? (ie. it asked for ftp credentials) or direct (no questions asked, just straight install)?

ftp, although I used the wp-config.php file to submit the ftp credentials (not sure if that has to do anything with it)

comment:3 follow-up: @DD326 years ago

Is the error "Could not create directory" on all the failed install attempts, or just the empty-folder-exists case?

comment:4 in reply to: ↑ 3 @pampfelimetten6 years ago

Replying to DD32:

Is the error "Could not create directory" on all the failed install attempts, or just the empty-folder-exists case?

currently happens on all install attempts - even when I upload them as zip file in den admin backend. But thats another bug, isn't it?

comment:5 follow-up: @DD326 years ago

But thats another bug, isn't it?

The problem code will be the same for both actions (just in seperate functions). I'll take a closer look later and see if i can spot whats causing it, Probably forgotten to set permissions or something on a created folder..

The error message, Does it mention which folder it cant create?

comment:6 in reply to: ↑ 5 @pampfelimetten6 years ago

Replying to DD32:

The error message, Does it mention which folder it cant create?

No, but that would be indeed a great help to track down the error source.

comment:7 @pampfelimetten6 years ago

  • Severity changed from normal to major

comment:8 @klitscher6 years ago

Using 2.7-beta2-9705 I get a "Latest Version installed" message no matter which version of a plugin is installed. No messages about creating folders, just not receiving any notification of available upgrades. When I search for the plugin using the built-in plugin search, it tells me the latest version is installed even though the version numbers are obviously different.

@DD326 years ago

comment:9 @DD326 years ago

  • Keywords has-patch added; plugin uploader error removed

attachment 8129.diff added.

  • Adds a check to see if the plugin in the folder is actually the latest.
  • In the case of the plugin installed being a later version, a new button "Newer version (1.xx) Installed"
  • In the case that the API version is newer than the version in the updates array, the now "dirty" option is cleared. Upon loading update.php, it'll check for the new version and run from there.

comment:10 @ryan6 years ago

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

(In [9793]) Improve latest version detection in plugin updater. Props DD32. fixes #8129

Note: See TracTickets for help on using tickets.