WordPress.org

Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#6213 closed defect (bug) (fixed)

widget.php includes wrong javascript tag for category dropdown

Reported by: reppep Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.3.3
Component: Widgets Keywords: validation
Focuses: Cc:

Description

The Category dropdown uses JavaScript, and embeds it using the wrong (old?) syntax. Patch:

[root@inspector wp-includes]# diff -u widgets.php.ORIG widgets.php
--- widgets.php.ORIG 2008-03-13 22:18:25.000000000 -0400
+++ widgets.php 2008-03-13 22:19:10.000000000 -0400
@@ -630,7 +630,7 @@

wp_dropdown_categories($cat_args . '&show_option_none= ' . ('Select Category'));

?>


-<script lang='javascript'><!--
+<script type="text/javascript"><!--

var dropdown = document.getElementById("cat");
function onCatChange() {

if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {

Change History (3)

#1 @hansengel
12 years ago

I couldn't find the mistake that your describing in wp-includes/widgets.php with r7290.

Also, for future reference, please run a command like this:

svn diff > myPatchFile.diff

Then just attach that file. This way SVN handles it and it is much easier to read (when it is uploaded, we can view it using the Diff Viewer on Trac).

#2 @ryan
11 years ago

  • Component changed from Template to Widgets
  • Owner anonymous deleted

#3 @Denis-de-Bernardy
11 years ago

  • Milestone changed from 2.9 to 2.8
  • Resolution set to fixed
  • Status changed from new to closed

fixed in current trunk

Note: See TracTickets for help on using tickets.