2010 posts
  • Has referred 50+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
bitfade says

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

470 posts
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 5 years
  • Has sold $250,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+6 more
SaurabhSharma says

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. :)

1702 posts Building the Web.
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
  • Has sold $250,000+ on Envato Market
  • Had an item featured on Envato Market
+8 more
ZoomIt says

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 /> 

815 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Contributed a free file of the month
+3 more
rvision_ says
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 :)

2010 posts
  • Has referred 50+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
bitfade says
rvision_ said
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 :)
yeah …. pulled my hairs on this
glad it helped
737 posts
  • Has referred 500+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+7 more
mordauk says

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.

474 posts
  • Has sold $10,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Has referred 1000+ members
  • Helped several times protecting Envato Market against copyright violations
+4 more
readactor says

thanks for share!

834 posts
  • Power Elite Author: Sold more than $1M on Envato Market
  • Won a competition
  • Made it to the Authors' Hall of Fame
  • Has sold $1M+ on Envato Market and is now a Power Elite Author
+7 more
wpbakery says

bitfade Thank you so much! You saved my day!

Envato community + Google = Rock \m/

25 posts
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+4 more
doitmax says

thank you bitfade, saved my day!

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by