[wp-trac] [WordPress Trac] #47609: Archive widget has stopped working.

WordPress Trac noreply at wordpress.org
Wed Jun 26 05:03:46 UTC 2019


#47609: Archive widget has stopped working.
--------------------------+-----------------------------
 Reporter:  EXL           |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Widgets       |    Version:  5.2.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When I choose a month nothing happens.

 In previous versions of WordPress, ''<select>'' form was filled with the
 ''onchange'' property:

 {{{
 <select id="archives-dropdown-2" name="archive-dropdown"
 onchange="document.location.href=this.options[this.selectedIndex].value;">
 }}}

 This worked perfectly.

 Now JavaScript function is being used, which seems to work incorrect in my
 WordPress installation:

 {{{
 <script type="text/javascript">
 /* <![CDATA[ */
 (function() {
         var dropdown = document.getElementById( "archives-dropdown-3" );
         function onSelectChange() {
                 if ( dropdown.options[ dropdown.selectedIndex ].value !==
 '' ) {
                         document.location.href = this.options[
 this.selectedIndex ].value;
                 }
         }
         dropdown.onchange = onSelectChange;
 })();
 /* ]]> */
 </script>
 }}}

 Most likely this bug was introduced in this commit:
 [https://github.com/WordPress/WordPress/commit/bba488f2b7fc241b03063fefc58a1db479e977d6
 #diff-f1b15459db03501d704506f19d778693R107]

 P.S. I use these settings:

 [[Image(http://esxi.z-lab.me:666/~exl_lab/screens/WordPress_Archive_Widget_Settings.png)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47609>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list