1642 posts
  • Elite Author
  • Featured Author
  • 6 Years of Membership
  • Author Level 10
+8 more
fuelthemes
says

I am getting an error on my theme options page while trying to use the built-in media upload.

The error is “Cheatin ‘uh”

Any idea how to fix this?

119 posts
  • 6 Years of Membership
  • Affiliate Level 3
  • Author Level 7
  • Bundle Boss
+10 more
valendesigns
Envato team
says

Are you using your own custom script or a plugin/framework to create your theme options?

40 posts
  • 4 Years of Membership
  • Author Level 6
  • Collector Level 4
  • Exclusive Author
+1 more
synesthete
says

I bet You are using SMOF ;}

open medialibrary-uploader.php, delete everything and paste:

http://pastebin.com/raw.php?i=8WYprprH


If You were curious this line was added to the beginning of file:

add_action( 'init', 'optionsframework_mlu_init');
also line 113 was changed to:
'post_type' => 'options'
210 posts
  • Elite Author
  • 3 Years of Membership
  • Copyright Ninja
  • Exclusive Author
+3 more
aligatorstudio
says

Thank you, thank you, thank you !! :D:kiss: . I was just starting to grow new grey ones (hair, i mean ;) )...
Just, out of curiosity (in short), how did you come to this … ?

40 posts
  • 4 Years of Membership
  • Author Level 6
  • Collector Level 4
  • Exclusive Author
+1 more
synesthete
says

SMOF author posted solution ;}

https://github.com/sy4mil/Options-Framework/issues/95

But he didn’t precise his last answer (and I also thought it would be a hard day ;) ):

210 posts
  • Elite Author
  • 3 Years of Membership
  • Copyright Ninja
  • Exclusive Author
+3 more
aligatorstudio
says

;) ... yeah … now, the theme upgrade job is on the way … Sometimes i really hate WP update, and sometimes I love them …

495 posts Code Is Poetry
  • Elite Author
  • Author Level 11
  • 6 Years of Membership
  • Top Monthly Author
+10 more
gljivec
says

I bet You are using SMOF ;}

open medialibrary-uploader.php, delete everything and paste:

http://pastebin.com/raw.php?i=8WYprprH


If You were curious this line was added to the beginning of file:

add_action( 'init', 'optionsframework_mlu_init');
also line 113 was changed to:
'post_type' => 'options'

Thanks for this :)

3804 posts
  • Elite Author
  • Author Level 11
  • Trendsetter
  • 7 Years of Membership
+12 more
KrownThemes
says

And what if i’m not using SMOF ? :)

This is how i call the editor:
tb_show('', 'media-upload.php?post_id='+jQuery('#post_ID').attr('name')+'&type=image&TB_iframe=1');
170 posts I think about colours
  • Trendsetter
  • Weekly Top Seller
  • Greece
  • Elite Author
+5 more
SkatDesign
says

And what if i’m not using SMOF ? :) This is how i call the editor:
tb_show('', 'media-upload.php?post_id='+jQuery('#post_ID').attr('name')+'&type=image&TB_iframe=1');

You can try changing


post_id='+jQuery('#post_ID').attr('name')+'

with:

post_id=0


It worked for me.

426 posts
  • Affiliate Level 1
  • Author Level 5
  • Collector Level 3
  • Weekly Top Seller
+3 more
SimpleSites4U
says

Had fun last night updating my plugins to work with 3.4

Thankfully I worked it out after some brief head scratching and some trial and error and the updates where approved within a few hours so hopefully should not have too much of a knock on effect.

by
by
by
by
by
by