OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki


How can a plugin get instantiated as a handler?

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, jheckman, barbarah, btbell, bdgregg, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

How can a plugin get instantiated as a handler?

Postby springday » Sun Oct 21, 2012 8:52 am

Dear PKP team,

in my error log I found this message:

[18-Oct-2012 11:12:22] PHP Fatal error: Call to undefined method PayPalPlugin::getAuthorizedContextObject() in /html/ojs/lib/pkp/classes/handler/PKPHandler.inc.php on line 430


This line 430 looks like this:
Code: Select all
$templateMgr->assign('userRoles', $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES));


So somewhere a PayPalPlugin has been instantiated as a PKPHandler, while the inheritance line of the PayPalPlugin looks like this:
PayPalPlugin -> PayMethodPlugin -> Plugin -> PKPPlugin

Therefore I don't understand this error. Is a plugin supposed to extend the PKPHandler class and therefore be able to access its methods? Or is it wrong in the first place to treat a PayPalPlugin as a subclass of the PKPHandler? But then where did this slip happen?

Best regards,
Kai Weber
springday
 
Posts: 98
Joined: Wed Jul 25, 2012 2:56 pm
Location: Munich, Germany

Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 3 guests