Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Errors with WP 3.0 RC1 and Role Scoper 1.2.2

UserPost

7:29 pm
June 10, 2010


DougJoseph

Member

DougJoseph

posts 11

1

Hello in Christ!

We have a site running WP 3.0 RC1 and Role Scoper 1.2.2 along with several other plugins.

We are using a child theme of Twenty Ten, which (so far) is CSS only. No 'functions.php' file in the child theme.

As soon as we activated the plugin and set a page permission for a user (role: author), we started randomly getting error messages (see below) displayed right within the main menu bar (a Twenty Ten theme feature) at the top, which show up (seemingly at random) while browsing the frontend of the site:

Warning: preg_split() expects parameter 2 to be string, array given in ~PATH~/wp-content/plugins/role-scoper/hardway/hardway-taxonomy_rs.php on line 235

Warning: Invalid argument supplied for foreach() in ~PATH~/wp-content/plugins/role-scoper/hardway/hardway-taxonomy_rs.php on line 237

We can refresh a page that shows the error, and it disappears after the refresh. The errors occasionally show, and it seems to be regardless of what user is logged in, and even if no user is logged in.

Any ideas what we could tweak to stop the errors from being thrown?

7:40 pm
June 10, 2010


DougJoseph

Member

DougJoseph

posts 11

2

I just opened up hardway-taxonomy_rs.php.

I noticed some references to wp_cache at the top.

This causes me to realize I should mention I have our site running on

Quick Cache

Dramatically improves the performance & speed of your site! Also compatible with WordPress® Multisite/Networking.

Version 2.1.7 | By PriMoThemes.com / WebSharks, Inc. | Visit plugin site

8:13 pm
June 10, 2010


DougJoseph

Member

DougJoseph

posts 11

3

229        // don't offer to set a category as its own parent
230
231        if ( is_admin() && ( 'category' == $taxonomy ) ) {
232
233            if ( strpos(urldecode($_SERVER['REQUEST_URI']), 'categories.php') ) {
234
235                if ( $editing_cat_id = $scoper->data_sources->get_from_uri('id', 'term') ) {
236
237                    if ( ! empty($args['exclude']) )
238
239                        $args['exclude'] .= ',';
240
241   
242
243                    $args['exclude'] .= $editing_cat_id;
244
245                }
246
247            }
248
249        }

8:19 pm
June 10, 2010


DougJoseph

Member

DougJoseph

posts 11

4

screenshot_for_error-message-regarding-Role-Scoper.jpg

7:45 am
June 11, 2010


johncrumpton

Member

johncrumpton

posts 2

5

Same here, it's random too. If you reload the page sometime you get it sometimes not. I think it's related to the new wordpress menu. I only get the error when I have a menu item which is a post category. When there is just pages no error.

Warning: preg_split() expects parameter 2 to be string, array given in C:\xampplite\htdocs\bsa\wp-content\plugins\role-scoper\hardway\hardway-taxonomy_rs.php on line 235 Warning: Invalid argument supplied for foreach() in C:\xampplite\htdocs\bsa\wp-content\plugins\role-scoper\hardway\hardway-taxonomy_rs.php on line 237

9:56 am
June 11, 2010


DougJoseph

Member

DougJoseph

posts 11

6

I can confirm that we have category items in our menu.

The lines of code referenced in the error messages pertain to category matters.

The remark above that section is "// don't offer to set a category as its own parent."

What is interesting is the randomness. Why would it happen sometimes but not at other times?

10:30 am
June 11, 2010


DougJoseph

Member

DougJoseph

posts 11

7

While I am logged out, I am being served static HTML pages that were generated by Quick Cache.

I am in the process of testing multiple log-outs (with "purge and refresh" of the cache in between) to see what happens.

On my first pass through (within that scenario) currently there are two certain places in the menu that always show the error. The error messages always display on those two pages, because all is "frozen" and locked into HTML by the Quick Cache program when I am logged out.

One of the items that always shows the error is the main blog page that displays all posts in all categories.

The other one that always shows the error is a category page that is set to show only posts in a certain sub-category. I have other such category pages that don't display the error (and they are displaying both parent-childless categories, parent-with-child categories, and child categories, aka sub-categories).

More soon.

10:34 am
June 11, 2010


DougJoseph

Member

DougJoseph

posts 11

8

Hmmm. I tried to log in and manually clear the cache, and it failed.


Warning: unlink(~PATH~/wp-content/cache/2071e8bc2a238d934999ff05b88cf4fc) [function.unlink]: Is a directory in ~PATH~/wp-content/plugins/quick-cache/includes/functions/garbage-collection.inc.php on line 91

Warning: rmdir(~PATH~/wp-content/cache) [function.rmdir]: Directory not empty in ~PATH~/wp-content/plugins/quick-cache/includes/functions/garbage-collection.inc.php on line 93

Unable to clear the cache.

10:46 am
June 11, 2010


DougJoseph

Member

DougJoseph

posts 11

9

I tried several times to clear the cache (both manually and via the automatic clearing that occurs when editing a post) and found that the Quick Cache plugin could not clear the cache as long as Role Scoper was active.

I then tried after deactivating Role Scoper, and Quick Cache immediately began to work again. At this point I have gathered that Quick Cache and Role Scoper don't yet play nice with each other.

I will probably temporarily deactivate caching while I do some testing on Role Scoper. However, since the Role Scoper errors are occuring even when caching is not an issue, eventually I will either need to get Role Scoper fixed for WP3 menus, or deactivate it until it's upgraded.

12:05 pm
June 11, 2010


DougJoseph

Member

DougJoseph

posts 11

10

So far, with caching turned off, and while I am logged out, I have yet to see the error. I have clicked through every menu item I have, and did not see the error while logged out.

I will now try to verify what is happening when I am logged in. Based on my prior looks, I think I may be seeing a trend. Here's what I think I am seeing:

While caching is turned off: Error seems to always show on the very first viewing of the frontend after logging in, and nowhere else.

I will try to verify that.

12:18 pm
June 11, 2010


DougJoseph

Member

DougJoseph

posts 11

11

After more testing, I have refined my hypothesis:

While caching is turned off:

Error seems to always show on the very first viewing of the frontend after logging in, and nowhere else, and it only shows the first time a different user logs in.

To explain further:

If I log in as a certain for the first time after logging out as another user, and view the frontend, I get the error. If I log out, and log in again as the same user, and visit the frontend again, I do not get the error.

If I log out, and log in again as a different user, and visit the frontend, I see the error. If I log out and back in again as that same user and visit the frontend, I will not see the error.

John, can you do a little test and see if that is so on your end?

9:35 pm
June 13, 2010


Kevin

Admin

posts 2503

12

I'll look into this after returning from vacation on Wednesday.

1:21 am
June 15, 2010


DougJoseph

Member

DougJoseph

posts 11

13

Thanks!

1:56 am
June 15, 2010


johncrumpton

Member

johncrumpton

posts 2

14

@DougJoseph I can confirm that if you are logged in and view the front end you get the error. When you refresh it goes.


About the Agapetry forum

Currently Online:

15 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1246

Posts: 5654

Members:

There are 1257 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin