Opened 15 years ago
Closed 15 years ago
#17674 closed defect (bug) (fixed)
Formatting Bug on Importer Memory Limit Error Message
| Reported by: | JohnONolan | Owned by: | duck_ |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2 |
| Component: | Import | Version: | 3.1.4 |
| Severity: | minor | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description
When running a WordPress import and hitting a memory limit, the error message displayed contains buggy formatting with html being rendered. Screenshot: http://cl.ly/7HyF
Attachments (1)
Change History (9)
#2
@
15 years ago
Screenshot of patch in action: http://cl.ly/7IMx
#3
@
15 years ago
- Keywords commit added
- Milestone Awaiting Review → WordPress.org
- Owner set to
- Status new → assigned
Looks fine. esc_html() is probably good to keep depending on some variable error messages.
#4
@
15 years ago
The patch John has attached is modifying WordPress core to remove the HTML tags rather than patching the importer. So should be 3.2 or Future Release.
esc_html() is probably good to keep depending on some variable error messages.
This is the problem I had with #16816 which fell into obscurity. Will close that since this has a proposed patch.
These errors are shown unescaped only in the inline uploaders in the editor -- see media_upload_form(), wp-admin/includes/media.php line 1465 -- and seem to be shown escaped in wp-admin/async-upload.php though I do not know where or if the user will ever see the latter.
#5
@
15 years ago
My thought behind the patch was mainly that the HTML tags weren't actually necessary in this context? Point taken about the larger issue of patching the importer though!
#7
@
15 years ago
I think stripping the HTML here makes the messages less useful so I did a quick audit of how core treats these messages:
- wp-admin/media-new.php - redirects on any error to wp-admin/upload.php?message=3 and shows a poor generic message - "Error saving media attachment."
- wp-admin/post-new.php - Media upload HTML - displays the HTML message (in red!)
- wp-admin/post-new.php - Media upload Flash - displays the HTML message with the tags in it :(
So it seems at the moment we have inconsistent behaviour in core.
It seems like stripping out the HTML from these messages is the most compatible solution for 3.2
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Removes unneeded html which is being rendered