CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Fatal error: Class 'JError' not found in........Error.php on line 301
Pages: [1]

Author Topic: Fatal error: Class 'JError' not found in........Error.php on line 301  (Read 8718 times)

Pelle P

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 0
  • CiviCRM version: CiviCRM 4.1.3
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.1.39
  • PHP version: 5.2.10
Fatal error: Class 'JError' not found in........Error.php on line 301
June 07, 2011, 04:53:57 am
I am checking if my mail processor script is working:

When I run:

/administrator/components/com_civicrm/civicrm/bin/EmailProcessor.php?name=Postmand&pass=sikkerhed&key=581c8877a583cf0e690e620a535b6655

I get this error after 10 sek.

Fatal error: Class 'JError' not found in /var/www/web71/web/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php on line 301

Any hints?

– After testing a little more, I now see a white page, when I run the link.

Is this OK?

Best Regards

Pelle
« Last Edit: June 07, 2011, 06:07:45 am by Pelle P »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Fatal error: Class 'JError' not found in........Error.php on line 301
June 07, 2011, 06:23:06 am

What evrsion are u running? there was an autoloading problem which is fixed in 3.4.2

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pelle P

  • I post occasionally
  • **
  • Posts: 58
  • Karma: 0
  • CiviCRM version: CiviCRM 4.1.3
  • CMS version: Joomla 2.5.6
  • MySQL version: 5.1.39
  • PHP version: 5.2.10
Re: Fatal error: Class 'JError' not found in........Error.php on line 301
June 08, 2011, 07:37:09 am
I am running 4.0.2

And now I see a white page. No error. No messages.

Is this good or bad?

Best Regards

Pelle

aluidens

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • CiviCRM version: 3.4.8/4.1.1
  • CMS version: J1.5.25/J2.5.4
  • MySQL version: 5+
  • PHP version: 5.1+
Re: Fatal error: Class 'JError' not found in........Error.php on line 301
December 27, 2011, 02:15:55 pm
I have also experienced this same error:

Fatal error: Class 'JError' not found in /var/www/web71/web/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php on line 301

This is a client site hosted on GoDaddy, using Joomla 1.5.25 and CiviCRM 3.4.7.  The error is thrown from a cronjob I have running every 15 minutes, and has been throwing the same error exact error, no white pages.

The cronjob output that is emailed (automatically, intentional):
Set-Cookie: PHPSESSID=6c1sp029vf4f8jeel683sge7j1; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html

<br />
<b>Fatal error</b>:  Class 'JError' not found in <b>/home/content/92/4951392/html/administrator/components/com_civicrm/civicrm/CRM/Core/Error.php</b> on line <b>306</b><br />


Any updates on this issue?

Thank you in advance for your assistance.

Best regards,
Angelo.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Fatal error: Class 'JError' not found in........Error.php on line 301
December 27, 2011, 06:01:04 pm

This is fixed in v4.1 . However it is not the cause of your issue. You might want to check your CiviCRM.*.log file and see what the real cause of the error is

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

pboom

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 3.4.8
  • CMS version: Joomla 1.5.25
  • MySQL version: 5.1.56
  • PHP version: 5.2 ?
Re: Fatal error: Class 'JError' not found in........Error.php on line 301
January 11, 2012, 06:09:03 pm
I've seen this error in CiviCRM 3.4.8 the Joomla 1.5 version. As a rank beginner I puzzled my way through it and was able to solve the problem. I hope to save others the headache.

The error is caused when CiviCRM attempts to display an error message using the Joomla Error Handle, which it can't in this case because it is not running inside joomla. Checking the error log in site/media/civicrm/templates_c/en_US/ConfigAndLog/CiviCRM.(33chars here).log Will show you the original cause of the error.

I found the proposed patch in on the CiviCRM issue site Key: CRM-9355 and applied it to the file referenced in the error message. The Patch involves replacing one line of code. The line to remove is marked with a negative sign the new line is marker with the positive sign. I believe this patch was applied to the 4.X version of CiviCRM as the issue was closed.

With patch applied the real cause of the error is displayed. And from my experience a blank page is a indication of success.


+++ CRM/Core/Error.php  (working copy)
@@ -302,7 +302,7 @@
         CRM_Core_Error::debug_var( 'Fatal Error Details', $vars );
         CRM_Core_Error::backtrace( 'backTrace', true );
         $content = $template->fetch( $config->fatalErrorTemplate );
-        if ( $config->userFramework == 'Joomla' ) {
+        if ( $config->userFramework == 'Joomla'  && class_exists('JError') ) {
             JError::raiseError( 'CiviCRM-001', $content );
         } else {
             echo CRM_Utils_System::theme( 'page', $content );


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Fatal error: Class 'JError' not found in........Error.php on line 301

This forum was archived on 2017-11-26.