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 (Moderator: Dave Greenberg) »
  • HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
Pages: [1] 2

Author Topic: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4  (Read 11284 times)

speedyrob

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Joomla 3.0.3
  • MySQL version: 5.5.23
  • PHP version: 5.3
HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
July 30, 2013, 01:21:00 pm
I am not sure which updated messed up the cron jobs, but my guess is going to be Joomla! 3.1.4 because the fatal error references a file for Joomla!

When the Cron jobs try to run, I get this error:

Fatal error: Interface 'JObservableInterface' not found in /home/tccadmin/public_html/libraries/joomla/table/table.php on line 26

What does this mean? I mean, the file table.php is different from version Joomla! 3.1.1 to 3.1.4, but what is different in functionality?

Let me know if you would like me to post any of my configuration, but I have followed step by step the configuration instructions from here:
http://wiki.civicrm.org/confluence/display/CRMDOC/Managing+Scheduled+Jobs

Please, someone help me with this code.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
July 30, 2013, 01:41:15 pm
Yes, this certainly looks like a Joomla issue and I would suggest you post it on the Joomla forums.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

speedyrob

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Joomla 3.0.3
  • MySQL version: 5.5.23
  • PHP version: 5.3
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
July 31, 2013, 08:29:45 am
HI

I talked to Joomla! folks and they tell me that I should put this line

JLoader::register('JObserverMapper', JPATH_PLATFORM . '/joomla/observer/mapper.php');

In the php script/file that I am using in the CRON job. Now, if I look at the cli.php file, there is really nothing there because I think it's getting stuff from cli.class.php, so which file/script should I insert the line above?

Let me know,
Thanks!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
July 31, 2013, 09:40:07 am
Try it in cli.php after 1 or 2 or 3 lines of the PHP code there. It might work OK. I'm not sure when CiviCRM loads the CMS--your line needs to go after that, however.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

speedyrob

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Joomla 3.0.3
  • MySQL version: 5.5.23
  • PHP version: 5.3
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
July 31, 2013, 01:35:11 pm
HI

Now I'm getting this error when I put the line with JLoader in it

Fatal error: Class 'JLoader' not found in /home/tccadmin/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php on line 30

So, how can I reference the file '/libraries/joomla/observer/mapper.php' correctly from a CiviCRM php file?

Let me know
Thanks!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
July 31, 2013, 01:45:06 pm
So then you should try to put it in cli.class.php perhaps around the initialize method. You may have to experiment a bit to find the right place.

Or someone who knows might answer here. :)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

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: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
July 31, 2013, 02:58:47 pm

1. figure out how / who load the joomla file for the first error. You'll need to add some debug statements and be a bit comfortable using php

2. based on the above, i'd add the below a bit before the error. I suspect u need to initialize joomla etc and doing it in cli*.php might be a bit too early, IMO

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

speedyrob

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Joomla 3.0.3
  • MySQL version: 5.5.23
  • PHP version: 5.3
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
July 31, 2013, 03:21:07 pm
HI

Thanks! I will have to learn how to do debug statements in PHP.

Paul R

speedyrob

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.3
  • CMS version: Joomla 3.0.3
  • MySQL version: 5.5.23
  • PHP version: 5.3
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
August 01, 2013, 02:20:20 pm
Hi

Can someone tell me, help me, point me in the right direction as to how I should reference or register the file?

JLoader::register('JObserverMapper', JPATH_PLATFORM . '/libraries/joomla/observer/mapper.php');   (this is the way Joomla!) told me to do it

BUT, I am sure in CiviCRM it should be a statement written in an different way because now when I run it with this JLoader... statement, it says it doesn't know what JLoader is:

Fatal error: Class 'JLoader' not found in /home/tccadmin/public_html/administrator/components/com_civicrm/civicrm/bin/cli.php on line 36

Help? Please, I know I will have to debug, but I'm putting in this statement in the wrong form.

Paul R

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
August 02, 2013, 04:36:43 am
JLoader is a PHP class that is (apparently) part of Joomla. Your line of code is correct, but the file defining that class has yet been loaded, so it's "undefined" and PHP doesn't know what to do with it.

So you need to bootstrap Joomla, or find where CiviCRM does that, and then (presumably) Joomla will load that class for you, i.e. if your code comes after the bootstrap.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

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: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
August 02, 2013, 09:03:10 am

my first shot would be to add it here:

CRM/Utils/System/Joomla.php, function loadBootStrap (somewhere near the end of the function)

but this is just a guess from limited information :)

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

combrains

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 2
  • CiviCRM version: 4.3.3
  • CMS version: Joomla 3.1.x
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
August 10, 2013, 05:37:42 am
Hi guys,

Just like to mention that I'm having the same issue.  I'm on Joomla! 3.1.5 and CiviCRM 4.3.5.

Just reading through this thread, I have tried to insert the line of code from above where Lobbo suggested it should go (CRM/utils/system/joomla.php).  I have put it at the end of the function just before the return statement but my error log still spits out
Code: [Select]
PHP Fatal error: Interface 'JObservableInterface' not found in /var/www/vhosts/musikmakers.org.nz/httpdocs/libraries/joomla/table/table.php on line 26
If anyone has any more debug suggestions or can explain to me how the bootstrap function works in the joomla.php file I'd be grateful.(I have a basic knowledge of PHP but am still getting my head around object-oriented programming).

Cheers

diegov

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 0
    • dotPro Tecnologia e Comunicação
  • CiviCRM version: 4.3.5
  • CMS version: Joomla! 3.1.x
  • MySQL version: 5.3
  • PHP version: 5.3
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
August 13, 2013, 12:10:09 pm
Same problem here, using CiviCRM 4.3.5 on Joomla! 3.1.5. I'll try to debug it too. The first one to solve it, please tell the others :)

combrains

  • I post occasionally
  • **
  • Posts: 40
  • Karma: 2
  • CiviCRM version: 4.3.3
  • CMS version: Joomla 3.1.x
  • MySQL version: 5.1.44
  • PHP version: 5.3.1
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
August 18, 2013, 09:55:47 pm
Hi Guys,

After some hunting, it appears that this is a Joomla issue (something to do with one of the devs nat naming classes correct ;)  ).  There is a patch and much discussion on the Joomla issue tracker as it seems that this break all CLI apps - not just civiCRM.  I will post links to the tracker pages when I get home tonight - as I have them bookmarked on my laptop there.

I have not tested the patch at all, mostly due to lack of time.  So if someone could apply it and report back, I'd appreciate it.

Cheers

diegov

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 0
    • dotPro Tecnologia e Comunicação
  • CiviCRM version: 4.3.5
  • CMS version: Joomla! 3.1.x
  • MySQL version: 5.3
  • PHP version: 5.3
Re: HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4
August 20, 2013, 07:29:17 pm
Hi,
So, I found the references to the problem in Joomla! at:

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31663
and
http://forum.joomla.org/viewtopic.php?f=706&p=3062336

Tried to apply the patch proposed. It adds a file "import.php" at <joomla root>/libraries/import.php

I added a call to that file in cli.class.php and cron.php with

Code: [Select]
require_once '<joomla root>/libraries/import.php';
That made the errors go away, no more errors, even with PHP error_reporting = E_ALL | E_STRICT .

Buuuut, the Scheduled Jobs are still not running... I have no idea why. I was able to test it only in one installation, I'm willing to test it on a second one, where I have more observation capacity.

BTW, I found a second patch, appears more specific to the JObservableInterface interface at the following url, but I'll be able to test it just tomorrow.

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=31603

[]s, Diego

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM (Moderator: Dave Greenberg) »
  • HELP! Fatal Errors from Cron jobs with version CiviCRM 4.3.5 and Joomla 3.1.4

This forum was archived on 2017-11-26.