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.
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,
then you have to make empty forAllow Access
option or giving a particular role on it like as I image attached,
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.
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.
Your all images are blank/access denied. Can you reupload it or attached it?
Thanks.
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).
Which option has been set in your access settings as I image attached?
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.
I can’t find “Access Settings”. Is it a paid only option?
Here is everything under Downloads > Settings > Basic:
Oops, for free, it only will block download access but will show the file info, like title, desc, etc
thanks.
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.
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.
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.
It can be a browser cache issue, but the behaviour will be the same.
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.
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.
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/
Now showing
Access denied
the page for checking that issue.
Thanks.
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.
The topic ‘Using categories shows Access Denied on download page but not file or shortcode’ is closed to new replies.