- This topic has 2 replies, 2 voices, and was last updated 5 years, 7 months ago by
7studio.
-
AuthorPosts
-
-
June 23, 2016 at 4:58 am #6792
7studioMemberHi,
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.viewcannot pick up the post ID (wp.media.view.settings.post.idis egal to 0) and it fails the ajax methodwp_ajax_parse_embed.Thank you.
Attachments:
You must be logged in to view attached files. -
June 27, 2016 at 10:59 am #6808
-
June 27, 2016 at 2:29 pm #6818
7studioMemberHi @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');inpiklist/includes/class-piklist-forms.phpoverrides the WordPress’s default behaviour. Thewp_enqueue_mediacan 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 intoadmin_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.phpand it works well.
-
-
AuthorPosts
- You must be logged in to reply to this topic.