Make WordPress Core

Opened 11 years ago

Closed 6 months ago

#23374 closed defect (bug) (fixed)

Custom photo title is overwritten upon completion of upload

Reported by: franksvalli's profile franksvalli Owned by: joedolson's profile joedolson
Milestone: 6.5 Priority: normal
Severity: normal Version: 3.5.1
Component: Media Keywords: has-patch dev-feedback
Focuses: ui, javascript, administration Cc:

Description

Version: 3.5.1 (latest)
Environment: Chrome 24.0.1312.57 on Mac OSX 10.8.2

Steps to reproduce:

  1. Create a new post and click the Add Media button.
  2. Add several large photos (>4MB). This is necessary to give you time to perform step 3.
  3. Add new titles to the photos that are in the process of uploading.

Output: after a photo finishes uploading, its newly-added title get overwritten by a default title (taken from the filename)
Expected output: on the completion of a photo upload, the title field should be checked and preserved if necessary, not overwritten

(not related to plugins or theme)

Attachments (1)

23374.patch (2.0 KB) - added by rommelxcastro 9 years ago.

Download all attachments as: .zip

Change History (8)

#1 @kirasong
10 years ago

  • Focuses ui javascript administration added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Hi franksvalli!

Thanks for reporting this. Apologies that it's taken so long for you to receive a reply.

I'm able to reproduce this. It also appears to clear out the rest of the fields after the upload finishes, so you lose Title, Caption, Alt Text, Description, et. all.

I agree that we should either fix this, or disable the fields until the images have finished uploading.

#2 @rommelxcastro
9 years ago

hey guys,

i dig into this, the issue seems to be that if you edit a file that is being uploaded some properties that are necessary to update a file, this can be seem on media-models.js:257

one quick fix, can be hide the form while the file is uploading

@rommelxcastro
9 years ago

#3 @rommelxcastro
9 years ago

  • Keywords has-patch dev-feedback added; needs-patch removed

#4 @joedolson
9 months ago

  • Milestone set to 6.5
  • Owner set to joedolson
  • Status changed from new to accepted

Related: #58783

These two issues seem very much like the same problem; have had issues reproducing 58783, but I'm going to pair these and see if I can learn more with this tickets info.

This ticket was mentioned in Slack in #core-media by joedolson. View the logs.


6 months ago

#6 @joedolson
6 months ago

Confirming that this is the same issue as in #58783; will be fixed in the same commit.

#7 @joedolson
6 months ago

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

In 57515:

Media: Prevent local edits during media upload.

Prevent options.allowLocalEdits from toggling to true during the upload cycle. Otherwise, media meta fields can be edited, but the data will be lost as soon as the upload process is completed.

Props codepo8, oglekler, nicolefurlan, antpb, syamraj24, joedolson.
Fixes #58783, #23374.

Note: See TracTickets for help on using tickets.