Using categories shows Access Denied on download page but not file or shortcode

Viewing 20 posts - 1 through 20 (of 20 total)
#132213

Rob Holl
Participant

This started happening around the 3.1.0 update.

The setup:
To restrict downloads to our “valid” users, we assign a specific role to most of them and allow access to files by adding that role to certain categories.
On those restricted files, I clear out the “All Visitors” entry in the “Allow Access” field and leave the field blank. Then I add the category to the file.
I have also tested this adding the administrator role to the “Allow Access” field so that the field is not blank with the same results.
If I add the same user role to the file that is allowed in the category, the file works as before, but if I had to choose a role for each file, it would defeat the purpose of using categories.

The behaviour:
The download page (using [wpdm_all_packages]) now displays a red “Access Denied” button for each file that uses this config, but if you click on the title and go to it’s page, you are greeted with the ability to download it. Also, where the shortcode is used for the individual file, the download button works as expected.
When not logged in, all pages correctly show the please log in message for restricted files.

This behavior seems to have changed with recent updates. At some point, only the site admin saw the problem, but users with the other valid role did not. Now it affects all users in a role with permission to a category.

#132219

Nayeem Riddhi
Moderator

Hi,

Please let me know if the below clarification helps you,

Before giving access to a certain category for a particular role you have to set like as I image attached, you should use Use Link Template option and your particular role,

Image 2020-07-02 at 9.13.49 PM

then you have to make empty forAllow Access option or giving a particular role on it like as I image attached,

Image 2020-07-02 at 9.19.30 PM

because Package Access = Package Access + All Category Access = All Visitors + Subscribers = All Visitors

and Package Access = Package Access empty + Category Access(Subscribers) = Subscribers

or Package Access = Package Access(subscriber) + Category Access(Subscribers) = Subscribers

Hope you have understood.

Thanks.

#132223

Rob Holl
Participant

Thanks for the quick response! The only thing I had not done before was to set “Use Link Template”.
I have changed that but still have the same problem.
Here are the current configuration and results.

File
Category
User
Download Page

#132228

Nayeem Riddhi
Moderator

Your all images are blank/access denied. Can you reupload it or attached it?

Thanks.

#132229

Rob Holl
Participant

Ah yes, Cloudflare, sorry.

These are all on imgur: https://imgur.com/a/5uI7Use

My only guess was something to do with the multiple roles on a category, roles without any users, or some setting/plugin I haven’t included in the images (Ultimate Member, User Role Editor, WPDM – Page Template).

File

Category

User

Downloads

File Page

Shortcode

  • This reply was modified 4 years, 10 months ago by Rob Holl. Reason: mentioned some plugins
#132236

Nayeem Riddhi
Moderator

Which option has been set in your access settings as I image attached?

https://prnt.sc/tc6xuh

if you Only Block Download Link it will block only download link otherwise if you select Hide Everything, it will hide package title and info too.

Thanks.

#132240

Rob Holl
Participant

I can’t find “Access Settings”. Is it a paid only option?
Here is everything under Downloads > Settings > Basic:

Settings

#132241

Nayeem Riddhi
Moderator

Oops, for free, it only will block download access but will show the file info, like title, desc, etc

thanks.

#132242

Rob Holl
Participant

The problem is that the user should have full access to the file.
They have the correct “Download” button when viewing the file’s page or a shortcode to the file ([wpdm_package id='5716']), but on the page using the shortcode [wpdm_all_packages], they see the incorrect “Access Denied” button.

This was working properly before the 3.1.0 update.

#132243

Nayeem Riddhi
Moderator

this can be an issue. Please, give your temporary wp-admin login details in a private reply for checking the issue. and also please the related page.

Thanks.

#132244

Rob Holl
Participant
This reply has been marked as private.
#132254

Nayeem Riddhi
Moderator
This reply has been marked as private.
#132260

Rob Holl
Participant

I do not understand what you are asking.
The file cannot be accessed when logged out. That is the correct desired behavior.
The file has a category which has role access. This is the desired configuration.
The problem is the same in incognito mode and normal mode, on Chrome, Firefox, etc.

Again, the problem is that the same logged in user receives an incorrect “Access Denied” button in one place and the correct “Download” button in others.

#132261

Nayeem Riddhi
Moderator

It can be a browser cache issue, but the behaviour will be the same.

#132269

Rob Holl
Participant

It is definitely not a browser cache issue. I have tested this on Windows, Mac, IOS, Android with Chrome, Firefox, Safari, etc. All have the same bug. I have cleared the WP-cache as well as cloudflare’s cache. It also happens with a local test server. I’m sure other users will notice the same behavior and post eventually.

If you think of anything else I can do to help solve the problem, let me know. In the meantime I will look for an alternative working solution.

#132271

Nayeem Riddhi
Moderator

This page also gives you the same issue https://www.tanglegrove.org/download/financial-report-2020-05/? the user receives an incorrect “Access Denied” button in one place and the correct “Download” button in others. let me know.

Thanks.

#132293

Rob Holl
Participant

That page is not the problem.

The problem is on the /download/ page using the [wpdm_all_packages] shortcode. That table displays the incorrect “Access Denied” button for the same file (see the pictures above).

Incorrect: [wpdm_all_packages]
Correct: [wpdm_package id='5716']
Correct: /download/financial-report-2020-05/

#132303

Nayeem Riddhi
Moderator

Now showing

Access denied

the page for checking that issue.

Thanks.

#132345

Rob Holl
Participant
This reply has been marked as private.
#132854

Rob Holl
Participant

Final update:
We were able to reproduce this bug in a fresh install with nothing but wpdm added.
While we were able to locate the problem, it was easier to downgrade to version 3.0.97 than manually fix the code.
We will keep an eye out for a patch while we evaluate other options.
Best of luck to you.

Viewing 20 posts - 1 through 20 (of 20 total)

The topic ‘Using categories shows Access Denied on download page but not file or shortcode’ is closed to new replies.