Media protection addon for Protected Content not behaving as expected

Per @Jude's suggestion, I'm opening my own thread regarding media protection. It is currently disable as I am demoing the site now and don't want to have broken links. Support access is granted, so you can log in and add the media protection when you want to look at it.

Here are my issues:
1. Basic protection makes the protected files broken url
2. Complete protection masks the file name but the link to the file is broken (404). It also breaks images on the homepage.
3. Hybrid protection masks the file name and actually lets you access the file but breaks homepage images and when you copy and paste the url into a different browser which is not logged in, it does not block access to the file.

Lastly, is there a way to have some media files limited to subscription or group of members A and other files only accessible to group or level B? That way they both could access the site but could have media protection set differently for each group.

  • Michelle Shull

    Hey there, Ryan!

    First off, I was able to fix the 404 issue by re-saving your permalinks, so that's all good now. I turned media protection back off, since you're showing the site to your client, so as not to interfere with your plans here.

    Next, I noticed some of the text in your Protected Content is off, on the list of memberships, there should be two links, edit and payment information, your second link says "access level" instead. Was this an intentional change on your part? If not, I think you might have a plugin conflict interfering with your Protected Content settings, which may account for the other issues you're seeing here. Can you try briefly de-activating your other plugins, after you're done presenting the site, of course, and see if this resolves any issues you're having?


  • Ryan

    I figured I would post again in hopes of helping other people with this issue, but the main problem arises when you try to use url grouping to protect content and the media protection. The two addons do not communicate with each other, so you have to manually protect each page and then the media protection seems to work (as it is looking to the page where the files are attached to give permission or not).

    Hope this helps someone else out there!!

    if ( ! empty( $image )
    && ! empty( $attachment_id )
    && is_numeric( $attachment_id )
    ) {
    $post_id = get_post_field( 'post_parent', $attachment_id );

    // check for access configuration
    $membership = $this->ms_relationship->get_membership();
    if ( $membership->has_access_to_current_page( $post_id ) ) {
    $upload_dir = wp_upload_dir();
    $file = trailingslashit( $upload_dir['basedir'] ) . $image;
    $this->output_file( $file );
    } else {

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.