Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#5221 closed defect (bug) (invalid)

W3C validation Warnings

Reported by: tandilboy's profile tandilboy Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Template Keywords:
Focuses: Cc:

Description

the W3C validator shows the warning

Conflict between Mime Type and Document Type

The document is being served with the text/html Mime Type which is not a registered media type for the XHTML 1.1 Document Type. The recommended media type for this document is: application/xhtml+xml

fix in the next version?

Change History (9)

#1 @tandilboy
17 years ago

NOTE: wordpress encoding at utf-8

#2 @foolswisdom
17 years ago

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

Closing this bug as invalid b/c there is not enough details to isolate the problem.

#3 @JeremyVisser
17 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#4 @JeremyVisser
17 years ago

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

#5 @JeremyVisser
17 years ago

  • Component changed from Optimization to Template

We've already discussed this to death, and won't be serving up application/xhtml+xml anytime soon. Quick fix: change your DOCTYPE to be XHTML 1.0, not 1.1.

#6 @JeremyVisser
17 years ago

By the way, what theme are you using, which has the XHTML 1.1 DOCTYPE?

#7 @tandilboy
17 years ago

  • Milestone set to 2.3.1
  • Resolution wontfix deleted
  • Status changed from closed to reopened

ok this is the weblog

http://radiotandil.netherworld.com.ar/
(please check the error)

1) the bloginfo html_type shows text/html but the themplate has an

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

header. why? the default html type is XHTML. well i change this variable and replace the

<?php bloginfo('html_type'); ?>

with the application/xhtml+xml Content-Type. but the validator shows that error (current state).

NOTE: the theme are based in andreas 0.8

#8 @foolswisdom
17 years ago

  • Milestone changed from 2.3.1 to 2.5

W3C validation is not a severe symptom, no patch, no owner, so milestone 2.5 .

#9 @JeremyVisser
17 years ago

  • Milestone 2.5 deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

I'm sorry, changing the meta tag does not change what the Content-Type actually is — it needs to be set in the HTTP headers. Please just take my advice and change the DOCTYPE to an XHTML 1.0 one, please.

This is not a WordPress issue, actually, this is completely theme-related, stemming from the fact that the theme is not telling WordPress the correct HTML type.

If you really want to use XHTML 1.1 still, then add the following to your theme's functions.php:

<?php

function xhtml_mime_type($s) {
    return 'application/xhtml+xml';
}

add_filter('option_html_type', 'xhtml_mime_type');

?>
Note: See TracTickets for help on using tickets.