Viewing 15 replies - 1 through 15 (of 18 total)
  • I’m seeing the same issue…but only with a custom post type…works fine for stock “posts”.

    Hmm…did you find the culprit/reason this is the case? Are you using with a Custom Post Type by chance? This works for me withe stock “Post”:

    [Banner Image]
    type = file
    relation = true
    mediaPicker = true
    mediaLibrary = true
    label = Banner (background) Override

    Thread Starter difreo

    (@difreo)

    You’re right rpetersnmt! It’s not working with the custom post type only. With standard posts it’s working fine. I looked at the link of the “select by media picker” and it’s doesn’t have the id of the post
    media-upload.php?type=image&tab=library&post_id=&TB_iframe=true&tab=library&cftid=file_upload0_0
    Anyone got idea how to solve this issue?

    Thread Starter difreo

    (@difreo)

    update… it gets the id, so it must be something with the jquery functions?

    Yeah..it felt like a JS issue, but no errors on my end. Anybody else noticed this? We could consider posting in some other places too…I’m hoping the CPT author might see this and be able to quickly catch what’s going on.

    Any more news on this front? Difreo, did you happen to find a workaround? I think this is affecting “Pages” as well….from what I/we can tell, only Posts appear to be properly working with the Media Picker option.

    Thread Starter difreo

    (@difreo)

    Nothing new. I was unable to find the source of this issue ??

    I tried it out but it seems working well.
    Are there any JavaScript errors? Please try to disable other plugins except the custom field template.

    Thread Starter difreo

    (@difreo)

    Did You tried it with custom post types? I’ve disabled all plugins but CFT and it does not work. Double, triple checked it. WordPress doesn’t throw any errors.

    I am having the same issue as well. Works ok in normal posts and pages, but not on a custom post type. Disabled all plugins except for qTranslate.

    Thread Starter difreo

    (@difreo)

    Hello Hiroaki, did You find the solution to this issue? It seems like more people have this problem.

    Exactly the same problem. Have been using CFT with media picker on normal posts with no problems. I had to create a custom post type today, but clicking on the “use this” link in the media window doesn’t add a value to the field. Only on custom field types.

    Just to add my voice, I’m having the same problem, too.

    The problem only seems to affect post types added manually using register_post_type in functions.php, though. I didn’t have the same problem with post types added using the ‘Custom Post Type UI’ plugin on another site, so perhaps it’s worth trying this (or another) plugin if you are having problems.

    This makes me wonder if there is some property that is being set by the plugin that needs to be set in the register_post_type function for the Media Picker to work.

    I’m using register_post_type from within functions.php to set up my custom post type too. Just updated to CFT 1.8.7, no change.

    Thread Starter difreo

    (@difreo)

    Victory at last! ?? Thanks bbloye. It was the problem with registering the post type. I’ve checked the ‘Custom Post Type UI’ plugin and it turns out that You have to set higher priority for add_action. In your functions.php:
    instead of add_action('init', 'register_post_type');
    should be add_action('init', 'register_post_type', 0);
    Can anyone confirm this?

    Solution confirmed! A big thanks to difreo and bbloye!

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Plugin: Custom Field Template] Media picker not inserting’ is closed to new replies.