Resources

My Agape try

Your Agape try


Support Forum

Current User: Guest Login Register
Please consider registering

Search 
Search Forums:


 




Fatal error when used without Role Scoper

UserPost

3:41 am
March 9, 2010


davidrapson

Member

posts 3

1

Firstly, thanks for making this plugin available. It's been a great use in a recent project.

However there is a bit of a large bug when using the plugin without Role Scoper (which the plugin page explains is possible).

When approving a revision (amongst other things) I receive the following error:

Fatal error: Class 'WP_Scoped_User' not found in … on line 132

From what I can tell this is caused by instantiating a new object without first checking that it exists. I am assuming here that WP_Scoped_User is part of Role Scoper and not Revisionary.

The errors can be avoided (or rather, hacked away) by performing an if (class_exists('WP_Scoped_User')) { } check before calling WP_Scoped_User

For the time being I have done this manually on my version of it, but as and when you release an update to the plugin these alterations would be overwritted.

I am aware that I could simply install Role Scoper to avoid these errors, but I don't need it and would be so much nicer to be able to use the plugin stand-alone.

Thanks,
David

10:31 pm
March 10, 2010


hiphip

New Member

posts 2

2

Yah, this is annoying. I hacked this by adding this line to «defaults_rvy.php»:

class WP_Scoped_User {function __construct($x, $y, $z) {return false;}}

8:51 am
March 11, 2010


Kevin

Admin

posts 1326

3

hiphip said:

Yah, this is annoying. I hacked this by adding this line to «defaults_rvy.php»:

class WP_Scoped_User {function __construct($x, $y, $z) {return false;}}


That hack will break email notification. Instead, just change all instances of WP_Scoped_User to WP_User.

4:03 am
March 18, 2010


davidrapson

Member

posts 3

4

@hiphip I'm glad someone else is having this problem, unfortunately your hack was bound to break something by overriding the class.

Kevin, do you recommend changing all calls to WP_User rather than checking for the existence of WP_Scoped_User? Is this solution less likely to break things in the short term?

To clarify checking existence of WP_Scoper_User doesn't seem to break email notification. I use email notification quite heavily so it would get noticed fairly quickly.

In the longer term do you have any plans to make Revisionary less tightly coupled to Role Scoper? I can foresee an number of situations where Revisionary would be useful on it's own.

Thanks for your help


11:12 am
March 18, 2010


Kevin

Admin

posts 1326

5

This is already fixed in last week's Revisionary update (1.0.2). I just forgot to trigger the "current version" status and update notice by editing the readme.txt "Stable tag".

12:20 pm
March 18, 2010


davidrapson

Member

posts 3

6

Fantastic, 1.0.2 is up on the Plugin Directory so I'll do a manual upgrade. I'm guessing these things take a while to propagate out to the automatic update system.

Thanks a lot for your help and the fantastic plugin.



Reply to Topic: Fatal error when used without Role Scoper

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 12 + 11        (Required)

Topic Reply:


 

About the Agapetry forum

Currently Online:

9 Guests

Maximum Online: 88

Forums:

Groups: 2

Forums: 7

Topics: 667

Posts: 3053

Members:

There are 601 members

There are 1 guests


Kevin has made 1326 posts

Top Posters:

metal450 - 98

YikYak - 58

Ragnar - 36

Daisy - 35

LorenW - 33

Administrator: Kevin | Moderators: Kevin