| User | Post |
|
3:11 am October 28, 2009
| victar
Member
| | | |
|
| posts 33 |
|
|
I got it working. I commented out line 7 in hardway-front_rs. Dirty fix but it does the trick.
|
|
|
11:14 am October 28, 2009
| Kevin
Admin
| | | |
|
| posts 1326 |
|
|
victar said:
I've been having some trouble with this today. I'm using the most recent dev. Any new tips?
What symptom were you seeing in your tag cloud? No tags at all?
Do you get the same results with version 1.0.8?
Is your tag cloud being generated via widget or function call? Any non-standard arguments?
|
|
|
11:20 am October 28, 2009
| victar
Member
| | | |
|
| posts 33 |
|
|
I'm using plain old wp_tag_cloud(). I get the same results with both .8 and .9. No tags at all when not logged in.
I have define('DISABLE_ATTACHMENT_FILTERING', true); and define('SCOPER_NO_SERVER_CACHE', true); set in my wp-config but removing them has no effect.
|
|
|
12:46 pm October 28, 2009
| Kevin
Admin
| | | |
|
| posts 1326 |
|
|
victar said:
I'm using plain old wp_tag_cloud(). I get the same results with both .8 and .9. No tags at all when not logged in.
Do any of the posts that are readable by anonymous users have tags? Role Scoper's tag cloud filter is supposed to hide tags to match post visibility.
If so, there is an experiment you can run for me:
1. Go to Roles > Options and turn off the Internal Cache ("cache roles and groups to disk").
2. Temporarily edit your hardway-front_rs.php file to put the following diagnostic code in function flt_get_tags, just above "return $results;":
echo $posts_qry;
echo '<br /><br />';
echo $qry;
|
|
|
4:04 pm October 28, 2009
| victar
Member
| | | |
|
| posts 33 |
|
|
The cloud is in my header, unassociated with any particular post. No posts on my site are readable by anonymous users.
After I added that code snipit I got this:
SELECT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships AS tr ON wp_posts.ID = tr.object_id WHERE 1=1 AND ( ( wp_posts.post_status = 'publish' AND ( ( ( ( ( ( ( tr.term_taxonomy_id IN ('1', '3', '4', '6', '7', '104', '9', '101', '102', '103', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100') AND 1=2 ) ) ) ) ) ) ) ) ) AND 1=1<br /><br />SELECT DISTINCT t.*, tt.*, COUNT(p.ID) AS count FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id AND tt.taxonomy = 'post_tag' INNER JOIN wp_term_relationships AS tagr ON tagr.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN wp_posts AS p ON p.ID = tagr.object_id WHERE p.ID IN (SELECT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships AS tr ON wp_posts.ID = tr.object_id WHERE 1=1 AND ( ( wp_posts.post_status = 'publish' AND ( ( ( ( ( ( ( tr.term_taxonomy_id IN ('1', '3', '4', '6', '7', '104', '9', '101', '102', '103', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100') AND 1=2 ) ) ) ) ) ) ) ) ) AND 1=1) GROUP BY t.term_id ORDER BY count DESC LIMIT 10
I then turned off the internal cache and now it's simply blank.
|
|
|
4:12 pm October 28, 2009
| victar
Member
| | | |
|
| posts 33 |
|
|
Now when logged in, I see this.
SELECT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships AS tr ON wp_posts.ID = tr.object_id WHERE 1=1 AND ( ( wp_posts.post_status = 'publish' AND ( ( ( ( ( ( ( tr.term_taxonomy_id IN ('1', '3', '4', '6', '7', '104', '9', '101', '102', '103', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100') AND 1=2 ) ) ) OR ( ( wp_posts.ID IN ( SELECT uro.obj_or_term_id FROM wp_user2role2object_rs AS uro WHERE uro.role_type = 'rs' AND uro.scope = 'object' AND uro.assign_for IN ('entity', 'both') AND uro.role_name IN ('private_post_reader') AND uro.src_or_tx_name = 'post' AND uro.group_id IN ('5') ) ) ) ) OR ( wp_posts.post_author = '2' ) ) ) ) ) OR ( wp_posts.post_status = 'private' AND ( ( ( ( ( ( wp_posts.ID IN ( SELECT uro.obj_or_term_id FROM wp_user2role2object_rs AS uro WHERE uro.role_type = 'rs' AND uro.scope = 'object' AND uro.assign_for IN ('entity', 'both') AND uro.role_name IN ('private_post_reader') AND uro.src_or_tx_name = 'post' AND uro.group_id IN ('5') ) ) ) ) OR ( wp_posts.post_author = '2' ) ) ) ) ) ) AND 1=1<br /><br />SELECT DISTINCT t.*, tt.*, COUNT(p.ID) AS count FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id AND tt.taxonomy = 'post_tag' INNER JOIN wp_term_relationships AS tagr ON tagr.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN wp_posts AS p ON p.ID = tagr.object_id WHERE p.ID IN (SELECT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships AS tr ON wp_posts.ID = tr.object_id WHERE 1=1 AND ( ( wp_posts.post_status = 'publish' AND ( ( ( ( ( ( ( tr.term_taxonomy_id IN ('1', '3', '4', '6', '7', '104', '9', '101', '102', '103', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100') AND 1=2 ) ) ) OR ( ( wp_posts.ID IN ( SELECT uro.obj_or_term_id FROM wp_user2role2object_rs AS uro WHERE uro.role_type = 'rs' AND uro.scope = 'object' AND uro.assign_for IN ('entity', 'both') AND uro.role_name IN ('private_post_reader') AND uro.src_or_tx_name = 'post' AND uro.group_id IN ('5') ) ) ) ) OR ( wp_posts.post_author = '2' ) ) ) ) ) OR ( wp_posts.post_status = 'private' AND ( ( ( ( ( ( wp_posts.ID IN ( SELECT uro.obj_or_term_id FROM wp_user2role2object_rs AS uro WHERE uro.role_type = 'rs' AND uro.scope = 'object' AND uro.assign_for IN ('entity', 'both') AND uro.role_name IN ('private_post_reader') AND uro.src_or_tx_name = 'post' AND uro.group_id IN ('5') ) ) ) ) OR ( wp_posts.post_author = '2' ) ) ) ) ) ) AND 1=1) GROUP BY t.term_id ORDER BY count DESC LIMIT 10
|
|
|
4:26 pm October 28, 2009
| Kevin
Admin
| | | |
|
| posts 1326 |
|
|
victar said:
The cloud is in my header, unassociated with any particular post. No posts on my site are readable by anonymous users.
That explains why the Role Scoper tags filter hides all tags! Since you want those tags to be displayed even though all the posts that contain them are unreadable, your initial workaround of commenting out the add_filter line is just right. I will consider providing some constant that you can define in your wp-config.php file to accomplish the same result.
|
|
|
4:32 pm October 28, 2009
| victar
Member
| | | |
|
| posts 33 |
|
|
Ah okay, thanks Kevin. Great plugin!
|
|