[wp-hackers] widget select field problems?

Stephanie Leary steph at sillybean.net
Thu Aug 6 20:03:56 UTC 2009


On Mon, 03 Aug 2009 20:13:05 -0700, Andrew Ozz <admin at laptoptips.ca> wrote:
> Stephanie Leary wrote:
>> (I hadn't noticed until just now that the </select> tag is missing as 
>> well as the <option>s. How bizarre!)
> 
> Yes, looks like something is stripping all html tags after the <select 
> .. >. Don't see any js in WordPress that would do this.
> 
> It still may be worth it disabling some of the js that runs after the 
> ajax loading of the html for a saved widget, like addEvents() or 
> fixLabels(), to see if it makes any difference. You can set 
> `define('SCRIPT_DEBUG', true);` in wp-config to load the dev. versions 
> of the default js.

Thanks for all the pointers. I'm sadly behind in learning ajax, so this has
been educational. I did find something that corrects the problem, but I'm
not entirely sure what this line was intended to do in the first place, so
I'm not sure what I just disabled. :/

In widgets.dev.js, line 196, I changed
$('.widget-content', widget).html(r);
to
$('.widget-content', widget).html;

... and my select boxes display correctly. But I'm having trouble
backtracking the origins of r... where did it come from, and what was it
supposed to do?


Stephanie Leary
sillybean.net




More information about the wp-hackers mailing list