Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#11569 closed enhancement (fixed)

Media.php validation fix

Reported by: Simek Owned by:
Milestone: 3.0 Priority: normal
Severity: minor Version: 2.9
Component: Validation Keywords: has-patch
Focuses: Cc:

Description (last modified by azaozz)

Remove unneeded empty span from the uploader and the Media Library screen.

Attachments (3)

media.php.validation.fix.patch (1.2 KB) - added by Simek 4 years ago.
media.php.validation.fix.v2.patch (2.6 KB) - added by Simek 4 years ago.
additional validation fix - missing FORM close tag added
11569.patch (1.4 KB) - added by hakre 4 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 follow-up: miqrogroove4 years ago

  • Keywords reporter-feedback added; has-patch tested removed

Empty span tags do not cause validation errors. This ticket should be closed invalid unless a proper description is added.

Simek4 years ago

additional validation fix - missing FORM close tag added

comment:2 in reply to: ↑ 1 Simek4 years ago

Replying to miqrogroove:
You have right - W3C Validator do not treat it like error but IMO avoiding empty spans is a good habit.

Additional in new patch - missing FORM close tag added.

comment:3 follow-up: miqrogroove4 years ago

  • Milestone 2.9.1 deleted
  • Resolution set to invalid
  • Status changed from new to closed

No Bug Description

Simek, you can't just throw patches at the developers and expect them to psychically understand why you want them to make changes. If there is a bug here you need to describe what the problem is, where you found it, and how someone else might find the same problem.

comment:4 azaozz4 years ago

  • Description modified (diff)
  • Keywords reporter-feedback removed
  • Milestone set to 3.0
  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:5 in reply to: ↑ 3 azaozz4 years ago

Replying to miqrogroove:

No Bug Description

Not everybody's first language is English. I can understand that it's easier to write code than descriptions. In this case the patch is pretty much self-explanatory.

comment:6 miqrogroove4 years ago

  • Severity changed from trivial to minor
  • Version changed from 2.9 to 2.5

After all the posts by staff complaining about tickets with a lack of information, I thought it would be helpful to close the bare patches. Once again I'm proven wrong and will let you guys fight amongst yourselves.

Here is the description I was working on to reopen the ticket:

If you look at the Upload/Insert buttons for attaching media to a new post, you can copy those links and hit them directly to grab code for validation. An example path looks like /wp-admin/media-upload.php?post_id=-1261613461&type=image&TB_iframe=true

At such URLs there is a full entity returned with (mostly valid) XHTML doctype. However, each entity contains one FORM element that is not closed, and does cause a validation error.

This was probably introduced at http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/media.php?rev=7092

I am not aware of any bug or cosmetic problem caused by the missing close tag.


comment:7 hakre4 years ago

  • Keywords has-patch added

Patch did not apply clean any longer. I updated it to relfect the two named changes, ignored the whitespace changes.

hakre4 years ago

comment:8 hakre4 years ago

  • Priority changed from low to normal

comment:9 hakre4 years ago

  • Version changed from 2.5 to 2.9

comment:10 azaozz4 years ago

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

(In [12582]) Remove unneeded empty span and add form closing tag in media.php, props Simek and hakre, fixes #11569

Note: See TracTickets for help on using tickets.