| User | Post |
|
9:21 am April 27, 2009
| VFHwebdev
Member
| | | |
|
| posts 8 |
|
|
Hi,
Loving the plugin, but after activating it I discovered some (not all) of my images in posts weren't displaying. I suspected an htaccess problem because I couldn't view my uploads directory at all. When I comment out the following line everything appears OK on the site:
RewriteRule ^(.*)wp-content/uploads/(.*) /index.php?attachment=$2&scoper_rewrite=1 [NC,L]
What does this line do and will Role Scoper function without it?
|
|
|
10:16 am April 27, 2009
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
That RewriteRule is the basis for Role Scoper's attachment filtering, which blocks attachment access unless the viewer has read access to a containing post/page.
If you can identify some different traits in the images which won't display, I might be able to find a solution. Are they larger than the others? In a different location? Any files located in your uploads folder (or a subdirectory of it) will be blocked unless they are added to the media library. Role Scoper has a built-in Attachments Utility (linked from the Role Scoper Options form) to automate that process.
|
|
|
11:59 am April 27, 2009
| VFHwebdev
Member
| | | |
|
| posts 8 |
|
|
I think the image problems were bigger than I thought. Post images started disappearing all over the place. I suspect some of the images were previously stuck in my cache, even though I'd emptied it several times.
Disabling the plugin brought them all back. I've re-enabled the plugin but added
define( 'DISABLE_ATTACHMENT_FILTERING', true);
to my wp-config. Things seem OK for now.
|
|
|
12:13 pm April 27, 2009
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
I'd still be interested in knowing if this explains your situation:
Any files located in your uploads folder (or a subdirectory of it) will be blocked unless they are added to the media library. Role Scoper has a built-in Attachments Utility (linked from the Role Scoper Options form) to automate that process.
|
|
|
12:32 pm April 27, 2009
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
Actually, I've since modified that behavior so that unattached uploads are not intentionally restricted by Role Scoper. Still, it's safer to store non-attachments outside the uploads folder.
I recently helped another user troubleshoot an attachment filtering problem which proved to be a server cache malfunction with files larger than ~10 MB. Maybe other servers demonstrate the same problem with smaller files. In the next RS release I'll include respect the following wp-config.php entry to disregard the server cache for all attachment access:
define( 'SCOPER_NO_SERVER_CACHE', true );
|
|
|
12:38 pm April 27, 2009
| VFHwebdev
Member
| | | |
|
| posts 8 |
|
|
Hmmm… The images are all in the media library. However some were reposted via FTP because a user uploaded a bunch of images that were way too large. It was easier to download them resize and re-upload outside of WP. That only applies to a few images though.
The server cache issue seems like a more likely culprit.
|
|
|
12:38 pm April 27, 2009
| VFHwebdev
Member
| | | |
|
| posts 8 |
|
|
BTW, thanks for all the help. I really appreciate it.
|
|
|
11:25 am August 27, 2009
| markbarnes
Member
| | | |
|
| posts 3 |
|
|
Sorry to hijack an old thread, but I'm experiencing exactly the same problem. I'm using RoleScoper 1.0.8.
I'm the author of the SermonBrowser plugin. This plugin uploads mp3 files into a subfolder of the wp-content/uploads folder.
The line added to .htaccess by RoleScoper blocked access (404 error) to several of these files. Your filesize theory may well apply. I've deleted the line from .htaccess now, but would be willing to re-add it temporarily if it would help you with bug testing.
Mark
|
|
|
12:06 pm August 27, 2009
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
markbarnes said:
The line added to .htaccess by RoleScoper blocked access (404 error) to several of these files. Your filesize theory may well apply. I've deleted the line from .htaccess now, but would be willing to re-add it temporarily if it would help you with bug testing.
Testing help is greatly appreciated. The first thing you can do is temporarily install my updated Development Snapshot. It includes some changes to the attachment filtering code. Do you see any difference?
Are the uploaded mp3 files attached to any post/page (as indicated in the Media Library), and can the logged user read that post/page?
|
|
|
7:55 am June 29, 2011
| Kevin
Admin
| | | |
|
| posts 2402 |
|
|
This was fixed in Role Scoper 1.1
|
|