Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




is_protected no longer works (& media uploader)

UserPost

9:40 am
February 9, 2009


metal450

Member

posts 159

1

After upgrading from rc8.9113 to rc9, is_protected($post->ID) no longer returns TRUE where it previously did (for posts marked as "Private" via Wordpress).


(I was upgrading because of another bug which occurred when uploading an image via the media uploader.  Due to the above bug in RC9, which poses some major problems with my theme - I use that function pretty extensively - I wasn't able to upgrade and verify if the following was also fixed):


Warning: array_intersect_key() [function.array-intersect-key]: Argument #1 is not an array in /home/metal450/public_html/wordpress/wp-content/plugins/role-scoper-rc8.9113/query-interceptor_rs.php on line 1551

Warning: array_intersect_key() [function.array-intersect-key]: Argument #1 is not an array in /home/metal450/public_html/wordpress/wp-content/plugins/role-scoper-rc8.9113/query-interceptor_rs.php on line 1558

Fatal error: Call to a member function get_term_roles() on a non-object in /home/metal450/public_html/wordpress/wp-content/plugins/role-scoper-rc8.9113/role-scoper_main.php on line 649

3:21 pm
February 9, 2009


Kevin

Admin

posts 2402

2

metal450 said:

After upgrading from rc8.9113 to rc9, is_protected($post->ID) no longer returns TRUE where it previously did (for posts marked as "Private" via Wordpress).


That's not a bug, but a bad previous implementation and bad current documentation on my part.

To use those template functions, you need to add the following line to wp-config.php:

define( 'SCOPER_EXTRA_TEMPLATE_FUNCTIONS', true );

This is a performance enhancement for the majority of sites that won't use is_protected() / is_restricted_rs() / is_exclusive_rs(). My mistake was not to require that define from the beginning, and not to clearly announce / notify you on the change.

3:23 pm
February 9, 2009


Kevin

Admin

posts 2402

3

metal450 said:

Due to the above bug in RC9 I wasn't able to upgrade and verify if the following was also fixed):


Wait a minute. Does that mean all the corresponding we've done on http://agapetry.net/forum/role-scoper/attachment-comment-count/page-1/post-821/#p821 is in regard to a site that's not yet on RC9?

3:26 pm
February 9, 2009


Kevin

Admin

posts 2402

4

metal450 said:

I wasn't able to upgrade and verify if the following was also fixed):


Warning: array_intersect_key() [function.array-intersect-key]: Argument #1 is not an array in /home/metal450/public_html/wordpress/wp-content/plugins/role-scoper-rc8.9113/query-interceptor_rs.php on line 1551

Warning: array_intersect_key() [function.array-intersect-key]: Argument #1 is not an array in /home/metal450/public_html/wordpress/wp-content/plugins/role-scoper-rc8.9113/query-interceptor_rs.php on line 1558

Fatal error: Call to a member function get_term_roles() on a non-object in /home/metal450/public_html/wordpress/wp-content/plugins/role-scoper-rc8.9113/role-scoper_main.php on line 649


Please do so. I resolved some Media Uploader issues with another RS user; they may be the same as you report above.

3:29 pm
February 9, 2009


metal450

Member

posts 159

5

Yessir…


I found that comment count bug, reported it, tried upgraading to RC9, discovered the lack of is_protected() which required me to rollback to RC8 IMMEDIATELY so as to avoid exposing private content…and reported the latter issue in my next thread :)


I'll #define that thing and see what happens with RC9…


Upgrading RS is usually a fairly involved process for me, as i'm sure you can imagine i don't want to risk exposing things that shouldn't be exposed - so I try to test as much of it as I can.  Good thing, or RC9 could've been quite a problem! :)

3:35 pm
February 9, 2009


metal450

Member

posts 159

6

The comment count bug (comments from other users causing comment count to double) is back with RC9.  About to try rc9.9209

3:44 pm
February 9, 2009


metal450

Member

posts 159

7

Comment counts for both regular posts and attachments seem to be working in rc9.9209.  So sorry about that - I guess I should've waited for a response on this post so I could upgrade before delving into the other bug!


Checking the media uploader next…

3:46 pm
February 9, 2009


metal450

Member

posts 159

8

Fixed!


About the Agapetry forum

Currently Online:

15 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1186

Posts: 5409

Members:

There are 1176 members

There are 1 guests


Kevin has made 2402 posts

Top Posters:

metal450 - 159

Ragnar - 105

YikYak - 70

whiteorb - 44

Daisy - 35

Administrator: Kevin | Moderators: Kevin