Hello Mike,
Hope you are well. Thanks for writing to us. It can have cache issue too or you can also save setting for the file again that it will regenerate settings again for that file. Please kindly check and let me know.
Thank you and kind regards
-
This reply was modified 1 year, 6 months ago by
Nayeem Hyder.
Nayeem,
I have found the issue but I’m not sure what to do about it. It’s adding multiple lines to the .htaccess file that adds the protection to the file(s) in question. In this case there are multiple lines referencing the same file in the same folder but they all have different wpdmmediaids. The older ones are first in the list so once it hits that record it returns a file not found error and stops, not making it to the correct line in the .htaccess file. Does that make sense? So either removing duplicates or creating the htaccess file in the opposite direction, placing newer records above the older records instead of below would fix this issue.
Thanks,
Mike
I have checked your issue from localhost, it it is working properly in here, tried replacing from directory folder it renders the file properly, also replacing from media library appends -1 to the file name. Can you please kindly check and let me know?
Thank you and kind regards
OK, I was able to recreate my issue using the following steps.
- Add a new file to the media library.
- Add protection to that file from the backend of the site using your plugin functionality.
- From the media library delete that same file permanently. (Do not remove the file protections)
- Add that same file to the media library again.
- Add protection to that file from the backend of the site using your plugin functionality.
- This causes two lines in the .htaccess file referencing the same file in the same folder with two different IDs. When you try to access the file it gets to the old record first and returns a media not found error.
Example lines from the htaccess file.
RewriteRule ^(2024/09/PDF-File-2.pdf)$ ../../index.php?wpdmmediaid=9493&wpdmmedia=$1
RewriteRule ^(2024/09/PDF-File-2.pdf)$ ../../index.php?wpdmmediaid=9494&wpdmmedia=$1
I also tested it on a clean WordPress install with only your plugin installed and it did the same thing. Just wanted to eliminate any theme or plugin things.
Does the .htaccess file residing in wp-admin, wp-content, wp-includes same folder , please kindly check and let me know.
Thank you and kind regards
I’m not sure exactly what you’re asking but this is in regards to the .htaccess file located in the uploads directory.
Sorry for the inconvenience. We are checking the issue, I have already forwarded it to our related team authority.
Thank you and kind regards
Thanks! I appreciate the support.
To me, the easiest fix would be to build the htaccess file in the opposite order, if possible.
The client I’m having this issue with just complained again. Has any progress been made on this issue?
I have again forwarded it to our related team authority. Please kindly check and let me know if you have any queries.
Thank you and kind regards
I have back with information from our team that, right now, there are two alternatives for your issue,
- Remove all restrictions from media library files
- delete all rules from
.htaccess file
Please kindly check and let me know.
Thank you and kind regards
I have forwarded your message to our team member. Please kindly check and let me know if you have any queries.
Thank you and kind regards