- Author was Featured
- Has been a member for 4-5 years
- Author had a Free File of the Month
- Sold between 100 000 and 250 000 dollars
- Bought between 10 and 49 items
- Europe
- Exclusive Author
- Referred between 200 and 499 users
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?
- Attended a Community Meetup
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 50 and 99 items
- Envato Staff
- Exclusive Author
- Has been a member for 4-5 years
- Item was Featured
Are you using your own custom script or a plugin/framework to create your theme options?
I bet You are using SMOF ;}
open medialibrary-uploader.php, delete everything and paste:
http://pastebin.com/raw.php?i=8WYprprHIf 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'
Thank you, thank you, thank you !! 
. I was just starting to grow new grey ones (hair, i mean
)...
Just, out of curiosity (in short), how did you come to this … ?
SMOF author posted solution ;}
https://github.com/sy4mil/Options-Framework/issues/95But he didn’t precise his last answer (and I also thought it would be a hard day
):
... yeah … now, the theme upgrade job is on the way … Sometimes i really hate WP update, and sometimes I love them …
- Author had a Free File of the Month
- Sold between 250 000 and 1 000 000 dollars
- Interviewed on the Envato Notes blog
- Author had a File in an Envato Bundle
- Author was Featured
- Europe
- Bought between 10 and 49 items
- Exclusive Author
synesthete said
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 
- Most Wanted Bounty Winner
- Sold between 250 000 and 1 000 000 dollars
- Has been a member for 5-6 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Won a Competition
- Bought between 100 and 499 items
- Exclusive Author
- Referred between 200 and 499 users
And what if i’m not using SMOF ? 
tb_show('', 'media-upload.php?post_id='+jQuery('#post_ID').attr('name')+'&type=image&TB_iframe=1');RubenBristian said
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.
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.
