Make WordPress Core

Opened 5 months ago

Closed 5 months ago

#62980 closed defect (bug) (fixed)

Media uploader error notice: Missing line break

Reported by: kharisblank's profile kharisblank Owned by: audrasjb's profile audrasjb
Milestone: 6.8 Priority: normal
Severity: normal Version:
Component: Upload Keywords: has-patch
Focuses: ui, css, administration Cc:

Description (last modified by sabernhardt)

https://cldup.com/bHPuHvWosB.png

This styling issue appears only in media uploader popup. [Screen recording https://cloudup.com/cP_trjcTLKY]

This bug doesn't occur in "Upload New Media" screen (under /wp-admin > Media > Add New). Ref:

https://cldup.com/ON-hjBf3uS.png

Steps to reproduce the issue

  1. Disable media upload by assigning not-writable permissions to the upload directory
  2. Create an image/media file with longer name, e.g.: 480071194_18488060998058819_8111621425497874072_n.jpeg
  3. Login to your site with any role that allows post editing
  4. Upload the image to your new/existing post via "Set featured image" button that appears in the top right side of post editor sidebar

Attachments (2)

Capture d’écran 2025-02-17 à 22.52.56.png (217.6 KB) - added by audrasjb 5 months ago.
Before patch
Capture d’écran 2025-02-17 à 22.53.06.png (222.1 KB) - added by audrasjb 5 months ago.
After patch

Download all attachments as: .zip

Change History (12)

#1 @sabernhardt
5 months ago

  • Description modified (diff)

#2 @audrasjb
5 months ago

  • Milestone changed from Awaiting Review to 6.8
  • Owner set to audrasjb
  • Status changed from new to accepted
  • Version 6.7.2 deleted

This ticket was mentioned in PR #8342 on WordPress/wordpress-develop by @sainathpoojary.


5 months ago
#3

  • Keywords has-patch added; needs-patch removed

This PR resolves an issue where long filenames in the media uploader popup would overflow. By adding word-break: break-all;to the .upload-error-filename class, filenames will now properly break into multiple lines to avoid UI issues.

Trac ticket:#62980

#4 @audrasjb
5 months ago

  • Keywords commit added; needs-testing removed

Thanks for the PR. We're good to go.

#5 @audrasjb
5 months ago

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

In 59834:

Uploads: Fix media uploader styling issue for long filenames.

This changeset resolves an issue where long filenames in the media uploader modal would overflow their container. By adding word-break: break-all; to the .upload-error-filename class, filenames now properly break into multiple lines.

Props kharisblank, audrasjb, sainathpoojary.
Fixes #62980.

#7 @sabernhardt
5 months ago

  • Keywords commit removed

This is already committed, and break-all works, but the error message could have reused a common class for break-word (available since [53777]):

<span class="upload-error-filename word-wrap-break-word">{{{ data.filename }}}</span>

#8 @audrasjb
5 months ago

Oh I totally forgot that class. I'll add a follow-up commit then, thank you @sabernhardt!

#9 @audrasjb
5 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#10 @audrasjb
5 months ago

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

In 59835:

Uploads: Use the word-wrap-break-word instead of specific CSS on .upload-error-filename.

This changeset replaces the word-break: break-all CSS declaration added to the .upload-error-filename element with the common class word-wrap-break-word, for better maintainability.

Follow-up to [59834].

Props sabernhardt.
Fixes #62980.

Note: See TracTickets for help on using tickets.