OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Fatal error: Cannot access protected property HTMLPurifier_C

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, btbell, michael, bdgregg, barbarah, 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.

Fatal error: Cannot access protected property HTMLPurifier_C

Postby geoffg » Tue Jul 10, 2012 4:22 pm

I upgraded our OJS from 2.2.x to 2.3.7. The initial site comes up, I can login as admin. I am able to view some things, such as the browse "By Author" link. But when clicking on browse "By Issue" I get a strange fatal error. (Although the error is not shown.) After adding:

ini_set('display_errors', E_ALL);

to the beginning of the index.php file, I am able to see the following error:

Fatal error: Cannot access protected property HTMLPurifier_ConfigSchema::$singleton in [...my path to ojs...]/lib/pkp/lib/htmlpurifier/library/HTMLPurifier/ConfigSchema.php on line 78

Any ideas on what could be happening here? I ran all the db migration scripts okay and followed the other upgrade procedures. I sure we don't want to modify the htmlpurifier lib. It's a mature lib that is used in many projects. There must be some other problem. Ideas?
geoffg
 
Posts: 15
Joined: Tue Jul 10, 2012 4:08 pm

Re: Fatal error: Cannot access protected property HTMLPurifi

Postby asmecher » Wed Jul 11, 2012 8:33 am

Hi geoffg,

Hmm, that does appear to be an issue in the HTMLPurifier library, but I agree that modifying it would be a mistake. What version of PHP are you using? This kind of error sounds to me like a PHP version incompatibility, though I can't find anything online about it. You might consider updating the HTMLPurifier library that's shipped in OJS if there's a newer version available. It should be a drop-in replacement.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7737
Joined: Wed Aug 10, 2005 12:56 pm

Re: Fatal error: Cannot access protected property HTMLPurifi

Postby geoffg » Thu Jul 12, 2012 8:03 am

We're using php 5.2.5. The HTMLPurifier lib that is bundled with OJS is their latest version, 4.4. I'm thinking the bug must have to do with something outside of the HTMLPurifier lib, maybe with how our php environment is set up. But I can't seem to find the problem. Any troubleshooting ideas are appreciated.
geoffg
 
Posts: 15
Joined: Tue Jul 10, 2012 4:08 pm

Re: Fatal error: Cannot access protected property HTMLPurifi

Postby asmecher » Thu Jul 12, 2012 9:16 am

Hi geoffg,

I'd suggest posting here in the HTMLPurifier forums, since my hunch is that the issue is there rather than in OJS: http://htmlpurifier.org/phorum/
Please do follow up here if you can figure out a resolution.

It looks to me like a modification to that library to remove the "protected" designation for the $singleton variable will probably solve the problem, though it does seem odd that nobody else has reported this.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7737
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests