Title: Converted to WP.  Several validation errors!
Last modified: August 19, 2016

---

# Converted to WP. Several validation errors!

 *  [backspaces](https://wordpress.org/support/users/backspaces/)
 * (@backspaces)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/converted-to-wp-several-validation-errors/)
 * I’ve recently converted a website to WP (from Textpattern). Here’s the url: [http://backspaces.net/](http://backspaces.net/)
 * Looks fine. Spent a lot of time getting everything to work, but finally online.
 * But: there a problem. It doesn’t validate!
    [http://validator.w3.org/check?uri=http%3A//backspaces.net/](http://validator.w3.org/check?uri=http%3A//backspaces.net/)
 * Is there something I need to know about converting to WP in order to have valid
   XHTML?
 * Thanks .. sorry if this is too noob to believe.
 * Owen

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [backspaces](https://wordpress.org/support/users/backspaces/)
 * (@backspaces)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/converted-to-wp-several-validation-errors/#post-1200530)
 * BTW: If I validate just the first WP post .. the latest:
    [http://backspaces.net/46/new-website-again/](http://backspaces.net/46/new-website-again/)..
   I still get validation errors: [http://validator.w3.org/check?uri=http%3A//backspaces.net/46/new-website-again/](http://validator.w3.org/check?uri=http%3A//backspaces.net/46/new-website-again/)
 * Yikes! I hope this does not mean Classic is not valid, or that the HTML editor
   has a problem.
 * Owen
 *  [polchamdirector](https://wordpress.org/support/users/polchamdirector/)
 * (@polchamdirector)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/converted-to-wp-several-validation-errors/#post-1200541)
 * I am having the same problem. Can anyone recommend some themes that will validate.
   I need something along the line of the classic. Just one or two simple columns
   on the right.
 * Thanks for the help.
 *  Thread Starter [backspaces](https://wordpress.org/support/users/backspaces/)
 * (@backspaces)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/converted-to-wp-several-validation-errors/#post-1200819)
 * Well I found out that all but one of the validation problems was caused by the
   translation to WP from Textpattern. Not txp’s fault, but mine.
 * HOWEVER: there remains a problem in the search form: it uses an odd html form
   element in the general-template.php file:
    $form = ‘<form role=”search” method
   =”get” id=”searchform” action=”‘ . get_option(‘home’) . ‘/” >
 * This causes the validation error:
    Attribute “role” is not a valid attribute.
   Did you mean “frameborder” or “scrolling”? …s=”widget widget_search”><form role
   =”search” method=”get” id=”searchform” act
 * So we’re at the mercy of WP to upgrade, or simply hacking the core file ourselves.
 * One upscale tidbit: I fixed the broken article from txp by simply editing the
   article doing nothing (insert space, then delete it), then saving it in the WYSIWYG
   editor. It looks at the html and fixes problems like improperly balanced tags!
   Way cool.
 * Owen
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/converted-to-wp-several-validation-errors/#post-1200821)
 * > This causes the validation error:
   >  Attribute “role” is not a valid attribute.
   > Did you mean “frameborder” or “scrolling”? …s=”widget widget_search”><form 
   > role=”search” method=”get” id=”searchform”
 * It’s a very minor issue. Specifically the inclusion of the HTML5 role attribute
   in a default theme with an XHTML DOCTYPE.
 * > So we’re at the mercy of WP to upgrade, or simply hacking the core file ourselves.
 * Uh!? It’s in the **theme** – not the core files! Go amend the default theme yourself.
   Or make a copy, get rid of all of the references to the role attribute and save
   the result as a new theme. That way, your “custom” theme won’t be over-written
   when you upgrade.
 *  Thread Starter [backspaces](https://wordpress.org/support/users/backspaces/)
 * (@backspaces)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/converted-to-wp-several-validation-errors/#post-1200827)
 * No, its not in the theme. See:
    [http://core.trac.wordpress.org/ticket/10108](http://core.trac.wordpress.org/ticket/10108)
   And they won’t fix it even though it simply means deleting the phrase: role=”
   search” in the file general-template.php.
 * It can be easily fixed by adding a searchform.php file to the Classic theme however,
   although I think the default/fallback should be valid.
 * Look: here’s the rub — I was hoping I could simply use CSS on the Classic theme
   to achieve my desired results, one of which was validation. I believe Classic
   will always give this validation error.
 * I guess this is the WordPress Way, but I find it arrogant.
 * Owen
 *  [shantic](https://wordpress.org/support/users/shantic/)
 * (@shantic)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/converted-to-wp-several-validation-errors/#post-1201016)
 * I had the same problem with the role tag and then I found this piece of code,
   since I was using the sidebard to add the search this worked PERFECTLY:
 *     ```
       ob_start();
       if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Left Side Index") ) : endif;
       $output = ob_get_contents();
       ob_end_clean();
       echo str_replace('role="search"', '', $output);
       ```
   
 * just modify it to your needs (e.g change the name of the sidebar)
 * I found this code on this [site](http://aaron-kelley.net/blog/2009/08/wordpress-_wp_unfiltered_html_comment-causing-pages-to-fail-xhtml-validation/)
   hope it works for you 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Converted to WP. Several validation errors!’ is closed to new replies.

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)
 * [TextPattern](https://wordpress.org/support/topic-tag/textpattern/)
 * [validate](https://wordpress.org/support/topic-tag/validate/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [shantic](https://wordpress.org/support/users/shantic/)
 * Last activity: [16 years, 6 months ago](https://wordpress.org/support/topic/converted-to-wp-several-validation-errors/#post-1201016)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
