Hello world-press!

Hi everyone,

Before starting anything, I’d like to show you how to debbug this great theme (iNove). This beautiful them sould be valid XHTML 1.1 but this is not the case when you install it.

Hidden input misplaced

The first invalidity is about the comment form when you are logged as admin (or when allowed to post unescaped code as comment). The error is about a hidden input which is not in a block tag. To fix it, just open the file /wp_content/themes/inove/comments.php and go the EOF.

200
201
202
203
204
	</div>
	<?php do_action('comment_form', $post->ID); ?>
	</form>
 
<?php endif; ?>

The problem is about the PHP function call which is not in the div tag. This function will generate something like that :

<input type="hidden" id="_wp_unfiltered_html_comment" name="_wp_unfiltered_html_comment" value="xxxxxxx" />

Just move the PHP line upper to get in the div tag :

200
201
202
203
204
		<?php do_action('comment_form', $post->ID); ?>
	</div>
	</form>
 
<?php endif; ?>

Save and upload.

A list item closing tag in excess

This issue is about comment list. Did you see that there is an excessive </li> in the list with this theme? Check out your source code :

			<div class="content">
				<div id="commentbody-1">
					<p>Bonjour, ceci est un commentaire.<br /> Pour supprimer un commentaire, connectez-vous, et affichez les commentaires de cet article. Vous pourrez alors les modifier ou les supprimer.</p>
				</div>
			</div>
		</div>
		<div class="fixed"></div>
    </li>
</li>

Do you see the double </li> at the end?
Well, to fix it, open /wp_content/themes/inove/functions.php at the EOF :

438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
			<div class="content">
				<?php if ($comment->comment_approved == '0') : ?>
					<p><small><?php _e('Your comment is awaiting moderation.', 'inove'); ?></small></p>
				<?php endif; ?>
 
				<div id="commentbody-<?php comment_ID() ?>">
					<?php comment_text(); ?>
				</div>
			</div>
		</div>
		<div class="fixed"></div>
    </li>
<?php
}
?>

Just remove or comment the </li> tag, save and upload.

A list container closing tag in excess

If you installed the plugin WP-Gravatar, there is a bug in the widget called Author profile. This bug is about the content. If you see the generated source code, you will see an exceeding <ul> tag.
To fix it, open the file /wp-content/plugins/wp-gravatar/gravatars.php at line 1055. Read code comments :

1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
$profile_url = get_bloginfo('url');
$profile_url .= '/';
$profile_url .= get_option('default_profilepage');
$profile_url .= '/'; // Comment this line if your page has extension (mine is .html)
if($gravatar_profil == true){
// Comment the following line to prevent a big visual bug if you choose to show your icon
echo $before_widget . $before_title . $title . $after_title . "<ul>\n";
echo "<a href='$profile_url'><img style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar/$md5?size=$author_img_size&amp;default=$default' alt='' /></a>";
}
echo $profile_data;
echo "</ul>\n" . $after_widget; // Remove the </ul> tag which is useless.
}

Save, upload and reload. Now, it should be really valid XHTML 1.1 :)

Top

Posted Mercredi, février 18th, 2009 under rand(0).

3 comments

  1. Nilo dit :

    Bien vu pour les corrections.
    Merci :)

  2. Got some problems with other themes as well

  3. I really dig your themes. Once I get wp up and running on my site, I want to use one of your themes.

Top | Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>