1277 posts
  • Elite Author
  • Has been a member for 5-6 years
  • Sold between 100 000 and 250 000 dollars
  • Author had a Free File of the Month
  • Referred between 200 and 499 users
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
+1 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
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Envato Staff
  • Exclusive Author
  • Has been a member for 5-6 years
+3 more
valendesigns Staff says

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

32 posts
  • Bought between 50 and 99 items
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 50 000 and 100 000 dollars
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'
85 posts
  • Elite Author
  • Europe
  • Sold between 50 000 and 100 000 dollars
  • Has been a member for 2-3 years
  • Exclusive Author
  • Bought between 1 and 9 items
  • Referred between 1 and 9 users
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 … ?

32 posts
  • Bought between 50 and 99 items
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 50 000 and 100 000 dollars
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 ;) ):

85 posts
  • Elite Author
  • Europe
  • Sold between 50 000 and 100 000 dollars
  • Has been a member for 2-3 years
  • Exclusive Author
  • Bought between 1 and 9 items
  • Referred between 1 and 9 users
aligatorstudio says

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

382 posts Code Is Poetry
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 4-5 years
  • Interviewed on the Envato Notes blog
  • Author had a File in an Envato Bundle
  • Europe
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
+3 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 :)

3249 posts Nice Guy
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
+6 more
RubenBristian 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');
143 posts I think about colours
  • Elite Author
  • Sold between 100 000 and 250 000 dollars
  • Has been a member for 4-5 years
  • Bought between 100 and 499 items
  • Referred between 100 and 199 users
  • Exclusive Author
  • Greece
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
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
  • Has been a member for 2-3 years
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • United Kingdom
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