• I’ve only seen this since the recent update to 5.9.

    Previously in the media window you could select ‘Uploaded to this post’ to see images/files that were uploaded to that individual post. Looking at it now that option is no longer there.

    I’ve also noted that when uploading new images to a post/page they are also not linked to that post/page any longer.

    This functionality is used on a lot of my sites to create galleries from images uploaded to posts automatically. If there’s now no way to get those images, it’s going to break a whole lot, and probably not just for me.

    Is this a bug, or expected, or something else?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’ve only seen this since the recent update to 5.9.

    I just tested this out, and from my tests, I found the feature present in 5.9 but only with the Classic Block and with the Cassic Editor plugin (ie Gutenberg disabled). I also found the feature in version 4.9 out of the box.

    So it seems this change goes way back to 5.0 with the integration of the new editor (aka Gutenberg).

    I’ve also noted that when uploading new images to a post/page they are also not linked to that post/page any longer.

    Images (and all attachments) are always linked or “attached” to the page/post (see screenshot below). What may be missing is a good user interface (UI) to view and manage the linked attachments.

    Thread Starter catacaustic

    (@catacaustic)

    Not any more George. 🙂

    I’ve got a custom post type that’s set up as:

    $args = array (
    	'labels' => $labels,
    	'public' => false,
    	'publicly_queryable' => false,
    	'show_ui' => true,
    	'query_var' => false,
    	'show_in_menu' => 'edit.php?post_type=otherposttype',
    	'show_in_rest' => true,
    	'rewrite' => false,
    	'capability_type' => 'post',
    	'hierarchical' => false,
    	'has_archive' => false,
    	'menu_position' => null,
    	'supports' => array (
    		'title',
    		'editor',
    		'page-attributes'
    	)
    );
    
    register_post_type ('newposttype', $args);

    If I have show_in_rest as true the images will get attached to the post as they are meant to, but as soon as show_in_rest is false all attachments do not get attached to the post and there’s no way to select attachments uploaded to that post.

    From what I can see, if the custom post type isn’t available to the REST API then the media uploading is broken like this. This has only come about from the latest update as I have been using this functionality even earlier this week.

    Thread Starter catacaustic

    (@catacaustic)

    After some more investigation…

    Having a custom post type that is not public (has either ‘public’ or ‘publicly_queryable’) set to false, is what breaks it.

    If a post type is public and available then the image upload works as expected. If it is not public the images are not attached to the post and there’s no option to view ‘Attached to this post’.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WP Media pop-up – missing ‘Uploaded to this post’’ is closed to new replies.