- Sold between 100 000 and 250 000 dollars
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Author had a Free File of the Month
- Won a Competition
- Author was Featured
- Item was Featured
- Bought between 10 and 49 items
I just recovered from a 2 hours long “wtf is going on ?? session”
here’s the issue: you call
tb_show('', 'media-upload.php?type=image&TB_iframe=true');
to let user add an image somewhere in your plugin/theme admin area but, as soon as thickbox window is closed, your tabs (or eventually other widget) stop working
Now, during the above session, i discovered that upon closing his windows thickbox calls:
jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload")
Once the Kraken is unleashed (unload event) he eventually reach your widget (jquery ui tabs in my case) which may reacts like this:
OMG ! The Kraken (unload event)! ALL IS LOST ! (self destroy)
Since this didn’t happen before 3.2, i think the issue is related to changes in trigger function with the new jQuery version (1.6)
anyway, the Kraken can be killed using this:
// placed right after tb_show call
$("#TB_window,#TB_overlay,#TB_HideSelect").one("unload",killTheDamnUnloadEvent);
function killTheDamnUnloadEvent(e) {
// you
e.stopPropagation();
// must
e.stopImmediatePropagation();
// DIE!
return false;
}
tought it was worth to share
- Author had a File in an Envato Bundle
- Sold between 250 000 and 1 000 000 dollars
- Author was Featured
- Item was Featured
- Contributed a Tutorial to a Tuts+ Site
- Exclusive Author
- Has been a member for 3-4 years
- India
Thanks for sharing that solution.
Now that we have a thread on WP3 .2 issues, let me share one more thing. There is an auto wrapping of the orphan <li /> tags inside the content editor (as of WordPress 3.2). i.e. when you will try to write the following code:
<li>my list item</li>
and switch between Visual/HTML mode. This code will be converted into:
<ul> <li>my list item</li> </ul>
Now since I was using some short code on stylish lists as:
[list params="foo"] <li>my list item</li> [/list]
It outputs the following code:
<ul class="as_defined_by_params"> <ul> //the added one by WP <li>my list item</li> </ul> </ul>
For now, I am directly inserting the HTML markup via JS tinyMCE insertion. I am sure there would be some filter to override and prevent this auto wrapping of orphan list items.
Edit: @bitfade, sorry for posting another issue. (I think a single thread will be okay for any such things). Don’t mind mate. 
- Microlancer Beta Tester
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Sold between 100 000 and 250 000 dollars
Thanks for sharing
Just one question, how do you get to call tb_show with adding post_id to the parameters ?
I always get this error
invalid regular expression flag A [Break On This Error] <b>Notice</b>: Undefined index: post_...dia.php on line <b>1423</b><br />
bitfade said
tought it was worth to share
Man, you saved me…Same problem here….
I just thought I had to go all over this thickbox crap again and jquery.
Thank you very much 
- Sold between 100 000 and 250 000 dollars
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Author had a Free File of the Month
- Won a Competition
- Author was Featured
- Item was Featured
- Bought between 10 and 49 items
rvision_ saidyeah …. pulled my hairs on this
Man, you saved me…Same problem here….I just thought I had to go all over this thickbox crap again and jquery.
Thank you very much![]()
glad it helped
- Attended a Community Meetup
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Most Wanted Bounty Winner
- Referred between 500 and 999 users
Definitely a good catch and glad you shared it! I haven’t run into this problem yet (I don’t think), but I’m sure I will.
thanks for share!
- Sold between 250 000 and 1 000 000 dollars
- Won a Competition
- Author was Featured
- Item was Featured
- Exclusive Author
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Europe
- Bought between 10 and 49 items
bitfade Thank you so much! You saved my day!
Envato community + Google = Rock \m/
thank you bitfade, saved my day!
