Tagged: , ,

This topic contains 2 replies, has 2 voices, and was last updated by  7studio 2 years, 11 months ago.

  • Author
  • #6792



    It seems that Piklist breaks oEmbed (e.g.: in the media uploader modal) when you edit a post from a CPT. All the things seem ok when you do the same thing from a “builtin” post type.

    After some investigations, it seems that the wp.media.view cannot pick up the post ID (wp.media.view.settings.post.id is egal to 0) and it fails the ajax method wp_ajax_parse_embed.

    Thank you.

    You must be logged in to view attached files.
  • #6808


    @7studio– Welcome to the Piklist community!

    Thanks for letting us know. We’ll look into it.

  • #6818


    Hi @Steve,

    Thank you for taking my issue under consideration. I think I finally found the bug 😀

    It seems that add_action('admin_enqueue_scripts', 'wp_enqueue_media'); in piklist/includes/class-piklist-forms.php overrides the WordPress’s default behaviour. The wp_enqueue_media can be done only once (cf.: media.php#L3220) and in Piklist, you don’t give the post object like in WP (cf.: media.php#L558) when you add this action into admin_enqueue_scripts. I don’t understand the reasons why you did that all the time.

    It is possible that this bug breaks also the relation (post_parent) between post and attachment :/

    I tried to remove the line into class-piklist-forms.php and it works well.

You must be logged in to reply to this topic.