Image upload does not show Parent post information

Support MB Frontend Submission Image upload does not show Parent post informationResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34581
    Régis EvennouRégis Evennou
    Participant

    Hi,
    Image uploaded, in Mb frontend submission context, does not show the parent post name in the "uploaded to" column Media library.
    Is it a normal behavior or should i find a trick to do that ?
    Thank you
    Régis

    #34590
    Long NguyenLong Nguyen
    Moderator

    Hi,

    You can use the helper function rwmb_meta() to get the image field associated with the post so I think no need to pay attention to the column "Uploaded To" in the media table. It works just like a post meta like the field.

    Refer to this topic
    https://support.metabox.io/topic/delete-media-files-when-delete/

    #34600
    Régis EvennouRégis Evennou
    Participant

    Hi,
    Thank you for your answer.
    I do not understand, maybe my explanations are not good 🙁

    My solution is to update the post (image) when the rwmb_frontend_after_process is activated.

    $arg = array('ID' => $media_id, 'post_parent' => $post_id,);
    wp_update_post( $arg );
    

    I wonder if this behaviour shoulb be automatic or if i have a bug in my code somewhere.

    Have a nice day !
    Régis

    #34612
    Long NguyenLong Nguyen
    Moderator

    Thanks for sharing your solution.

    I will inform the development team to consider supporting this case.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.