Support » Fixing WordPress » Strange sidebar widget behavior
Strange sidebar widget behavior
-
Noticed some validation issues and was alarmed at this:
<li class="pagenav">
<h2 class=""widgettitle""> Pages </h2>
Should be:
<h2 class="widgettitle"> Pages </h2>
This isn’t happening with any other widgets, just the ‘pagenav’/Pages widget (regardless of theme).
Any ideas where I would track this down? I’ve looked at widgets.php and can’t find anything wrong…
-
More info?:
‘Error Line 360, column 30: an attribute value must be a literal unless it contains only name characters .
<li class=”pagenav”><h2 class=\”widgettitle\”>Pages</h2>
Still can't track this down. I am using sidebar widgets, so I would think the problem would be in widgets.php, but: $title = htmlspecialchars($options[‘title’], ENT_QUOTES);` is used for for all the default widgets and I’m not seeing the problem in their titles…
Any ideas?
I finally gave up on this. For the life of me I couldn’t find the problem…
So, I removed the “Pages” sidebar widget from the active sidebar and no more error. bleh.
I just solved this problem on my site, with my custom-written theme. I had the exact same problem. I’m now validated XHTML 1.0 Strict. Dig in to wp-content/plugins/widgets/widgets.php, line 54, and modify the
'before_title' => '<h2 class="widgettitle">',
line and remove the class=”widgettitle” part. My stylesheet didn’t even use it. Yours might not either. I believe the before_title is being sent with the Widget title and having its quotes escaped somewhere down the road. It’s a pain in the rear, but I finally found it. Hope this helps.Actually updating widgets.php and upgrading to 2.0.4 fixed it ;’) Thanks though…
- The topic ‘Strange sidebar widget behavior’ is closed to new replies.