Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#36453 closed defect (bug) (duplicate)

Disable 'replace' button in replace media frame while attachment is uploading

Reported by: ungestaltbar's profile ungestaltbar Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9
Component: Media Keywords: has-patch needs-testing dev-feedback
Focuses: ui, javascript, administration Cc:


Steps to reproduce:

  1. Edit a post
  2. Insert an image into the editor
  3. Click on the image and chose 'edit' (pen icon)
  4. Chose 'replace' in the dialog
  5. Upload a new image.
  6. Click on the 'replace' button while the image is still uploading

Console throws javascript error.

(possible) Solution:

Add the require option to the toolbar.items.replace button config,
around line 5082 in media-views.js

replace: {
	style:    'primary',
	text:     l10n.replace,
	priority: 80,
        requires: { selection: true },

Tested version: Version 4.5-RC1-37153

Attachments (1)

patch_36453.patch (442 bytes) - added by shahpranaf 8 years ago.

Download all attachments as: .zip

Change History (7)

#1 @shahpranaf
8 years ago

  • Keywords has-patch needs-testing added

Hi @ungestaltbar's,

Firstly thanks for posting this bug. I followed the steps and confirm that its a bug.
And yes you were right about missing require selection option. I have fixed that bug with the patch.


#2 @jeremyfelt
8 years ago

  • Version changed from trunk to 3.9

Confirmed as well. For posterity, the error:

Uncaught TypeError: Cannot read property 'medium' of undefined in media-models.js?ver=4.5-RC2-37173-src:1072

This likely goes back to the introduction of replacing an image in the editor via [27050].

#3 @shahpranaf
8 years ago

  • Keywords dev-feedback added

#4 @shahpranaf
8 years ago

  • Focuses administration added

#5 @shahpranaf
8 years ago

Any feedback? IT would be great if we can incorporate in 4.6

#6 @wonderboymusic
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #40589.

Fixed in [40902]

Note: See TracTickets for help on using tickets.