WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#16816 closed defect (bug) (duplicate)

Wrongly formatted error message in Tools > Import

Reported by: djpeanut Owned by: duck_
Milestone: Priority: normal
Severity: trivial Version: 3.1
Component: Import Keywords:
Focuses: Cc:

Description

Very small bug. When uploading an XML file in the Import dialog which is bigger than the maximum allowed filesize for uploads, the error message is incorrectly displayed:

"The uploaded file exceeds the <code>upload_max_filesize</code> directive in <code>php.ini</code>."

Obviously the HTML tags shouldn't render and the wrapped text should be formatted as code. But this isn't the case. (Win7/Chrome/WP3.1)

Change History (7)

comment:1 @djpeanut4 years ago

I should have mentioned that this occurs when using the Wordpress XML import dialog.

comment:2 @solarissmoke4 years ago

  • Keywords reporter-feedback added

When uploading a large file via wp-admin/admin.php?import=wordpress, I get a properly formatted error. Are you using a different upload method/importer?

comment:3 @djpeanut4 years ago

I'm using the same method. I will go back and double check to see if it's a plugin conflict. Apologies if I overlooked something.

comment:4 @nacin4 years ago

  • Component changed from Administration to Import
  • Milestone changed from Awaiting Review to WordPress.org
  • Owner set to duck_
  • Status changed from new to reviewing

comment:5 @duck_4 years ago

WP_Import::handle_upload():

echo esc_html( $file['error'] )

Would have to double check that any error message is always generated internally by WordPress before removing the escaping.

comment:6 follow-up: @westi4 years ago

See also #17674

comment:7 in reply to: ↑ 6 @duck_4 years ago

  • Keywords reporter-feedback removed
  • Milestone WordPress.org deleted
  • Resolution set to duplicate
  • Status changed from reviewing to closed

Replying to westi:

See also #17674

Note: See TracTickets for help on using tickets.