Membership 2 Media Protection block CSS file

Using a theme where some of the CSS files are loaded from the media uploads folder, and when Media Protection add-on is activated these files are not loaded in the browser.

Request to the CSS files result in 403 forbidden.

  • Katya Tsihotska

    Hi mlux

    Hope you're having a wonderful day!

    Actually, this add-on shouldn't have any effect on CSS and JS files stored in uploads folder, so that's really weird behavior. I've tried to test it on my install by including some test CSS files from uploads folder but wasn't able to replicate the issue.

    I suppose that this add-on somehow conflicting with your theme. But just to make sure that no other plugins are causing this, could you perform plugin conflict test?

    The simplest way to perform a plugin conflict test:
    * Login to your site via FTP
    * Navigate to wp-content
    * Rename the plugins folder to _plugins
    * Create a new empty plugins folder
    * Move the plugin folder (ex: membership) you want to test from _plugins to plugins
    * Check if issue still persists, if no, proceed to the next step
    * Then, one at a time, move other plugin folders over from _plugins to plugins until the symptom returns

    NOTE: While you are doing this, do not visit WP Admin > Plugins on your site. This will ensure that your plugins remain active when you copy them back over.
    Let us know about results.

    Also, we would like to have a closer look at your installation, we need your WordPress and FTP (or cPanel) credentials, you can send your details through our contact form using this template:

    Subject: "Attn: Katya Tsihotska"
    -WordPress admin username
    -WordPress admin password
    -login URL
    -FTP credentials (host/username/password)
    - cPanel credentials (login URL/username/password)
    -link back to this thread for reference
    -any other relevant URLs

    Please use this subject line to ensure that it gets assigned to me :slight_smile:

    DO NOT post any credentials here, as it's a public forum.

    Kind regards,

  • Katya Tsihotska

    Hi mlux

    I've just checked your site once again and wasn't able to replicate this issue. I've enabled Media Protection add-on and checked in different browsers, but there are no errors in browser console anymore. I also tried to load one of the files with the issue by direct URL:

    And it loads fine even when the add-on is enabled.

    Were you able to managed to solve this somehow? Could you please check this and let us know if you still face this issue?

    Kind regards,

  • Katya Tsihotska

    Hi mlux

    Sorry, I really missed that I have to clear the cache.

    I've checked once again and found the cause of the issue. There is an option at the Membership 2 -> Settings -> Advanced Media Protection that allows access to certain types of files. You have to add css and js to the "Only allow direct access to the following file extensions." field and click Update htaccess.

    Actually, I've already done that for you and this helped to solve the issue. Please check on your end and let me know if the issue still persists.

    I would like to apologize for that I've missed that option first.

    Kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.