Opened 6 weeks ago
Last modified 2 weeks ago
#63243 reviewing defect (bug)
Long user display names overflow container on Edit Media screen
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.9 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Media | Keywords: | has-patch |
Focuses: | ui, css, administration | Cc: |
Description
When a user has a very long display name with no spaces (e.g. ThisIsAReallyLongDisplayNameWithNoBreaksWhatsoever), it causes layout overflow on the Edit Media screen (wp-admin/post.php?post=ID&action=edit for media attachments).
Steps to Reproduce
- Create a user with a very long display name (no spaces or breakable characters), e.g.: ThisDisplayNameIsUnreasonablyLongAndBreaksTheLayoutOfEditMediaScreen
- Set "Display name publicly as" to the long name.
- Log in as that user.
- Navigate to "Media" → "Add New" and upload a media file.
- Click "Edit" on the uploaded media item to open the Edit Media screen.
- Observe that the "Uploaded by" field overflows or breaks the layout due to the long display name.
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.27.4
- Database: mysqli (Server: 8.4.4 / Client: mysqlnd 8.2.28)
- Browser: Chrome 135.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.1
- MU Plugins: None activated
- Plugins: Test Reports 1.2.0
Screenshot
Attachments (1)
Change History (16)
This ticket was mentioned in PR #8658 on WordPress/wordpress-develop by @sainathpoojary.
6 weeks ago
#1
- Keywords has-patch added
#2
@
6 weeks ago
- Milestone changed from Awaiting Review to 6.9
- Owner set to audrasjb
- Status changed from new to reviewing
- Version trunk deleted
@audrasjb commented on PR #8658:
6 weeks ago
#3
Thanks for the patch.
I'd suggest to apply this CSS rule to the container .misc-pub-section misc-pub-uploadedby
instead of the link.
#4
@
6 weeks ago
- Keywords changes-requested added
Thanks for the ticket and patch. I suggested some changes in the PR.
#5
@
6 weeks ago
Hi @audrasjb,
I’ve applied the CSS rule to .misc-pub-section .misc-pub-uploadedby
instead. When you have a moment, I’d appreciate it if you could take a look.
Thanks again for the review!
#6
@
6 weeks ago
- Component changed from Administration to Media
- Focuses administration added
- Keywords changes-requested removed
You made the requested changes, but using the word-wrap-break-word
class instead is another possibility:
<div class="misc-pub-section misc-pub-uploadedby word-wrap-break-word">
#7
@
6 weeks ago
Test Report
Patch tested: https://core.trac.wordpress.org/ticket/63243
Test Environment [Playground]
- WordPress: 6.9-alpha-20250408.024349
- PHP: 7.4.31-dev
- Server: PHP.wasm
- Database: WP_SQLite_Translator (Server: 5.5 / Client: 3.40.1)
- Browser: Chrome 135.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.1
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
The "Uploaded by" field overflows text was looks fixed and displayed as expected.
Test result Screenshot - https://core.trac.wordpress.org/attachment/ticket/63243/image%20(2).png
#8
follow-up:
↓ 9
@
6 weeks ago
Thanks, @sabernhardt, for the feedback. Using the predefined word-wrap-break-word
class does seem like a better approach. Should we also make misc-pub-filename
consistent and apply word-wrap-break-word
to it as well? If so, should we also remove the misc-pub-filename
class name from this section?
#9
in reply to:
↑ 8
@
6 weeks ago
Should we also make
misc-pub-filename
consistent and applyword-wrap-break-word
to it as well?
In #55393, I apparently chose not to add the new class to the filename's element, which already wrapped the overflow with the misc-pub-filename
class. If changing that is desirable, however, it would belong on a separate ticket (as an enhancement).
This ticket was mentioned in Slack in #core-test by oglekler. View the logs.
5 weeks ago
#12
@
5 weeks ago
- Keywords changes-requested added; has-patch removed
@sainathpoojary I sent you a review of the code, I believe that just with what @sabernhardt proposed is enough to sort this issue and move it over to review.
#13
@
4 weeks ago
- Keywords has-patch dev-feedback added; changes-requested removed
@audrasjb everything ready for review.
I think this can go easily into 6.8.1
Fixes layout overflow on the Edit Media screen when a user has an excessively long display name. Applies word-break: break-all; to ensure proper wrapping in the “Uploaded by” section.
Before:

After:

Trac ticket: #63243