Jump to content


Photo
- - - - -

PageLines Blocking Cron Job?

pagelines cron job civicrm

Best Answer Rob , 27 April 2013 - 02:58 PM

Do you have Contact7 active on your site? Or any contact form plugins?

 

This was interesting:

http://forum.civicrm...p?topic=27077.0

 

And it seems to be a common topic on their forum:

http://forum.civicrm...p?topic=24751.0

 

They have a list of available experts you can call upon that may be able to help you set this up properly:

http://civicrm.org/what/experts

 

I hope this helps!

Go to the full post


  • Please log in to reply
15 replies to this topic

#1 go9media

go9media

    Member

  • Members

  • 20 posts

Posted 25 April 2013 - 07:57 PM

Hi everyone. I hope someone will be able to help me with this situation; I'm happy to provide any clarification or additional information needed!

 

I'm using CiviCRM with my PageLines/WP install and have been having issues sending group emails (that's not what I'm asking for help with here, just laying the groundwork a bit to give context). The key to getting the plugin to send the emails seems to be having the cron job on my server fire correctly. I've set up a cron job using wget which should work but doesn't. The test for this is to try the URL I'm using for the wget directly in my browser, but when I do, I get the following error message: 

 

Fatal error: Call to a member function pagelines_register_sections() on a non-object in /home/go9anpf/public_html/wp-content/themes/pagelines/includes/class.sections.php on line 79

 

Searching the PageLines forums for a fix, I found this post:

 

Please Login or Register to see this Hidden Content

 

 

Trying the crm.php code Simon so helpfully listed in the above post did not change anything for me. To be clear, I'm on the following:

 

PageLines 4.2.1 (Base Theme)

CiviCRM version: 4.2.6

CMS version: WordPress 3.5.1

MySQL version: 5.1.68-cll

PHP version: 5.2.17

 

The more I try to work through this, the deeper it seems to go. Any help or advice (geared toward an advanced-novice level front-end developer) would be much appreciated!



#2 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 25 April 2013 - 08:49 PM

Where did you put the code?



#3 go9media

go9media

    Member

  • Members

  • 20 posts

Posted 25 April 2013 - 09:56 PM

I created a file called crm.php and put the exact code as listed in your post into that file. I then put that file in /wp-content/plugins/



#4 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 25 April 2013 - 10:09 PM

In that case it's in the wrong folder mu-plugins NOT plugins Sent from my iPad using Tapatalk HD

#5 go9media

go9media

    Member

  • Members

  • 20 posts

Posted 25 April 2013 - 10:15 PM

I have no mu-plugins folder in wp-content; should I create one?



#6 Simon_P

Simon_P

    Messer

  • Administrators
  • 8388607 posts
  • LocationDevon
  • Framework Version:2.0
  • Country: Country Flag

Posted 25 April 2013 - 10:17 PM

I have no mu-plugins folder in wp-content; should I create one?

Yes


Sent from my iPad using Tapatalk HD

#7 go9media

go9media

    Member

  • Members

  • 20 posts

Posted 25 April 2013 - 10:21 PM

Okay. Just did that and got this error, sitewide:

 

Fatal error: Class 'Fix_CRM_Cron' not found in /home/go9anpf/public_html/wp-content/mu-plugins/crm.php on line 20



#8 James B

James B

    Advocate

  • Moderators
  • 4979 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 25 April 2013 - 11:33 PM

Did you add

 

define( 'CRMCRON', true );

 

to the cron.php as well?



#9 go9media

go9media

    Member

  • Members

  • 20 posts

Posted 26 April 2013 - 11:56 AM

Hi James. This is exactly what is in crm.php (copied from the Simon's code in the post linked above):

Please Login or Register to see this Hidden Content

As you can see, define( 'CRMCRON', true ); is not part of the code.

 

Where would I add that line?

 

Thanks!


Edited by go9media, 26 April 2013 - 12:43 PM.


#10 Danny

Danny

    Is Awesome!

  • Moderators
  • 13021 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 26 April 2013 - 12:02 PM

In this post -

Please Login or Register to see this Hidden Content

Simon states you need to add that line of code to the cron.php file.



#11 go9media

go9media

    Member

  • Members

  • 20 posts

Posted 26 April 2013 - 12:42 PM

Gotcha. No, I had not added that. I just did and got the following sitewide error:

 

Fatal error: Class 'Fix_CRM_Cron' not found in /home/go9anpf/public_html/wp-content/mu-plugins/crm.php on line 20



#12 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 27 April 2013 - 01:24 PM

Hi,

 

Are you using this plugin?

Please Login or Register to see this Hidden Content

 

Also, I've dealt with CiviCRM before with WP.  There are several issues with it that crop up from time to time.

 

From my experience, often when errors are thrown by the system, they point to PageLines Framework, but in fact, the errors have nothing to do with the Framework itself. It's just that it happens within the view of the Framework, so the error is displayed that way.

 

From the looks of that error, my guess is that the cronjob should in this case, be outside the WP structure, since it's calling upon the server's mail function, not a WP function.  To support this, read this Drupal related article: 

Please Login or Register to see this Hidden Content

as it describes the need to put the cron in the server root.

 

CiviCRM should provide you with support for setting up a cronjob for mail and I believe this topic may point you in the correct direction: 

Please Login or Register to see this Hidden Content

.

 

This Wiki from their site may also help: 

Please Login or Register to see this Hidden Content

 

Unfortunately, this cron task is something that should be supported directly by CiviCRM as PageLines isn't going to block any cron task set up properly outside the parameters of WordPress.

 

Hope this helps!



#13 go9media

go9media

    Member

  • Members

  • 20 posts

Posted 27 April 2013 - 02:48 PM

Hi OSE,

 

Thanks for your support on this. I'd gathered from Simon's post that the way CiviCRM has set up the cron.php file that it's needlessly complicated and calling a version of the theme within which to authenticate the login info on the wget process, so I do understand this is really CiviCRM's issue to help me resolve. Unfortunately, though I've posted this issue in their community forums, there's very little in the way of activity and support there for people using CiviCRM on WordPress, so I've not received any real support.

 

Regarding your specific points:

- I'm not using the plugin you reference. There's no connection between my CiviCRM contacts and my WP registered users, so I don't believe I have a need for it. Am I missing something here?

- The Drupal article is interesting. I'm essentially looking for this same kind of solution, but for WordPress. I'm not a coder, so I'm unable to create this myself.

- I am very familiar with the CiviCRM documentation for installation and configuration of CiviMail and for setting up cron job; thanks! Those pieces would be working perfectly if not for the error message created when the wget attempts to authenticate login...

 

I appreciate the PageLines community more and more every day. Many thanks for taking the time to provide all this support.



#14 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 27 April 2013 - 02:58 PM   Best Answer

Do you have Contact7 active on your site? Or any contact form plugins?

 

This was interesting:

Please Login or Register to see this Hidden Content

 

And it seems to be a common topic on their forum:

Please Login or Register to see this Hidden Content

 

They have a list of available experts you can call upon that may be able to help you set this up properly:

Please Login or Register to see this Hidden Content

 

I hope this helps!



#15 go9media

go9media

    Member

  • Members

  • 20 posts

Posted 27 April 2013 - 03:07 PM

I did have Contact Form 7 active, but deleted it after reading about it conflicting with cron job. Deleting that plugin has not helped my situation.

 

It is indeed a very common topic; clearly the integration of CiviCRM and WP is less than stellar at this time -- unless your WP install is very basic.

 

Thanks for the link to the expert firms; that will most likely be my next direction I head in.

 

Having someone else to knock these things around with is always a big help! Thanks very much!



#16 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 27 April 2013 - 03:10 PM

You're very welcome.  Let us know how it goes!







Also tagged with one or more of these keywords: pagelines, cron job, civicrm