WordPress.org

Make WordPress Core

Opened 5 weeks ago

Closed 12 days ago

Last modified 38 hours ago

#48277 closed enhancement (fixed)

Update plupload library to the latest version

Reported by: Hareesh Pillai Owned by: desrosj
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: External Libraries Keywords: has-patch early
Focuses: javascript Cc:
PR Number:

Description

The version of plupload.js bundled with WordPress is v2.1.9 (released on 2016-05-15)
The attached patch updates the library to v2.3.6

Further, the patch also updates moxie.js from v1.3.5 to v1.5.7

Link: https://github.com/moxiecode/plupload/releases

Attachments (3)

48277.diff (372.0 KB) - added by Hareesh Pillai 5 weeks ago.
48277.2.diff (788.0 KB) - added by desrosj 3 weeks ago.
48277.3.diff (414.6 KB) - added by desrosj 12 days ago.

Download all attachments as: .zip

Change History (12)

@Hareesh Pillai
5 weeks ago

#1 @SergeyBiryukov
5 weeks ago

  • Milestone changed from Awaiting Review to 5.4

#2 @desrosj
3 weeks ago

  • Keywords early added

For reference, here is a complete list of changes from version 2.1.9 to 2.3.6: https://github.com/moxiecode/plupload/compare/v2.1.9...v2.3.6.

It also seems that there is a newer version, 3.1.2 (and Moxie 1.5.8). We should try to update to this version instead (if possible). A list of changes from version 2.1.9 to 3.1.2: https://github.com/moxiecode/plupload/compare/v2.1.9...v3.1.2

Adding early so this can receive lots of testing.

@desrosj
3 weeks ago

#3 @desrosj
3 weeks ago

  • Keywords needs-testing added

48277.2.diff updates to the latest versions of both Moxie and plupload. In my initial testing, everything seems to working great. I tested the Media Library, and post edit screen using the Classic Editor.

@hareesh-pillai if you could give some testing to confirm, we should be able to shepherd this in next week for some soak time.

@desrosj
12 days ago

#4 @desrosj
12 days ago

  • Focuses javascript added
  • Keywords needs-testing removed
  • Owner set to desrosj

48277.3.diff moves plupload and MoxieJS to NPM, and integrates it into the build process. To accomplish this, handlers.js and wp-plupload.js have been moved to the js/_enqueues/wp/plupload folder. When WordPress is build, all files are put in the correct places.

I also made some JavaScript fixes to handlers.js and wp-plupload.js that are not detected by JSHint as a result of the move.

And finally, I updated the plupload-all, plupload-html5, etc. handles to match the new version of Plupload. This was added in [28108] for back-compat and the versions matched then, but the version fell out of sync with future updates.

#5 @desrosj
12 days ago

I forgot to mention that this results in the license.txt being removed. I couldn't find any other packages included through NPM that also included a license file. This can be easily added to the copy task in Grunt if anyone feels it should remain.

#6 @desrosj
12 days ago

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

In 46634:

External Libraries: Update Plupload from 2.1.9 to 2.3.6.

This change also updates the MoxieJS dependency from 1.3.5 to 1.5.7, converts Plupload to a dependency in NPM, and integrates all relevant parts into the build process.

For a full list of upstream changes, see https://github.com/moxiecode/plupload/compare/v2.1.9...v2.3.6.

Props desrosj, hareesh-pillai.
Fixes #48277.

#7 follow-up: @desrosj
12 days ago

In 46638:

External Libraries: Revert [46634-46635].

On further investigation, Plupload changed it’s license to a non-GPL compatible license. The newest, GPL compatible version is being used already in Core.

Unprops desrosj.
See #48277.

#8 in reply to: ↑ 7 @azaozz
12 days ago

Replying to desrosj:

Right, the Plupload license has changed from GPLv2 to AGPL after version 2.1.9. WordPress already includes the latest compatible version of it. There were some other fixes/changes there too. See #40158 and #41755.

#9 @nasiralamreeki
38 hours ago

Since we can’t use newer versions from upstream is there a plan to replace this versus keeping something we can’t update from upstream anymore?

Note: See TracTickets for help on using tickets.