Jump to content
go9media

PageLines Blocking Cron Job?

Recommended Posts

go9media    0
go9media

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:

 

http://www.pagelines.com/forum/topic/25739-civicrm-pagelines-no-cron/ 

 

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!

Share this post


Link to post
Share on other sites
Simon    247
Simon

Where did you put the code?

Share this post


Link to post
Share on other sites
go9media    0
go9media

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/

Share this post


Link to post
Share on other sites
Simon    247
Simon

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

Share this post


Link to post
Share on other sites
go9media    0
go9media

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

Share this post


Link to post
Share on other sites
Simon    247
Simon
I have no mu-plugins folder in wp-content; should I create one?
Yes Sent from my iPad using Tapatalk HD

Share this post


Link to post
Share on other sites
go9media    0
go9media

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

Share this post


Link to post
Share on other sites
James B    436
James B

Did you add

 

define( 'CRMCRON', true );

 

to the cron.php as well?


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
go9media    0
go9media

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

<?php
// Add this to wp-content/mu-plugins/crm.php

if( class_exists( 'CRM_Utils_System_WordPress' ) ) {
  class Fix_CRM_Cron extends CRM_Utils_System_WordPress {
		
		function __construct() {
			if( ! defined( 'CRMCRON' ) )
				return;
			add_filter('template', array( &$this, 'change_theme') );
			add_filter('option_template', array( &$this, 'change_theme') );
			add_filter('option_stylesheet', array( &$this, 'change_theme') );
		}
		function change_theme() {
		    // Alternate theme
		    return 'twentyten';
		}	
	}
}
new Fix_CRM_Cron;

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

 

Where would I add that line?

 

Thanks!

Edited by go9media (see edit history)

Share this post


Link to post
Share on other sites
go9media    0
go9media

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

Share this post


Link to post
Share on other sites
Rob    547
Rob

Hi,

 

Are you using this plugin? http://civicrm.org/blogs/jag/wordpress-civimember-role-sync-plugin

 

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:  http://altinukshini.wordpress.com/2011/08/01/civicrm-civimail-cron-job-setup/ 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:  http://book.civicrm.org/user/current/initial-set-up/scheduled-jobs/.

 

This Wiki from their site may also help:  http://wiki.civicrm.org/confluence/display/CRMDOC43/CiviMail+Installation

 

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!


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
go9media    0
go9media

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.

Share this post


Link to post
Share on other sites
Rob    547
Rob

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

 

This was interesting:

http://forum.civicrm.org/index.php?topic=27077.0

 

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

http://forum.civicrm.org/index.php?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!


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
go9media    0
go9media

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!

Share this post


Link to post
Share on other sites
Rob    547
Rob

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


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • oseehys
      By oseehys+
      Hello There,
      So i want to use platform 5 and DMS sections on a single page, i am using a child theme with pinspro as my main theme and i activated platform 5, the only problem am having so far is the fixed option, my navbars are not aligning to their default size, and it will be great if platform 5 header and footer section will function, has anyone used this option, how can i make the best use of platform 5 and DMS on a site
      Cheers
    • thirdstonemedia
      By thirdstonemedia+
      I've been fighting with a resolution issue ? Want to use Flick Slider, the site looks great on my monitor but client says she can't see bottom of homes. I believe she's on an old PC using outdated browser/s ... but, she's important to me and I'd like to make this work, on her system. Without asking her adjust her own set-up. 
      I put the Flick Slider inside a container, here ::
      http://becauze.xyz/home-five
      Set the Height of Flick Slider to 50 Base ... I don't know how this works exactly ... there is a Base then a Min ... but, haven't adjusted the Min ::
      http://becauze.xyz/home-four/
      Tried using Splash Up, which presents the same issue (she can only see top of home) and she wants several images to rotate on Home page, so not sure this would work anyway ::
      http://becauze.xyz/
      I have tried going into Layout and making the width narrower, and that does make the site narrower, but the homes still don't display in full, on her system. Help ?

      Here are her screen grabs, both desktop and iPad  (dumped the chalkboard background).

      FInally, she said these look great ::
      http://www.sinclairaia.com/
      http://www.kristihanson.com/
      What am I doing wrong ?? Is there a better way to accomplish making the site look great on any resolution at any size ?
      Joanne
      (Longtime Pagelines-lover.)


    • Suneel
      By Suneel+
      I updated my theme to framework and now can't get rid of this bright blue bar that appears across the top of every page. It says, "A fixed bar that makes it easy to promote important content.", and then a button that says, "Get PageLines".
      I am a novice and need help.
      Thank you!
      Natalie
    • kwaoru
      By kwaoru
      Hi,
       
      I have been using DMS and pagelines.
      I am facing to a huge trouble with the appearance of one of my page on mobile (smart phones) built with pagelines.
      However I haven’t come to any solutions to organise either edit the appearance of mobile view to look neat or deactivate the responsive function. 
      Now it looks totally messy on the phone...
       
      1. Is there any way to edit the appearance of the mobile version (responsive theme)?
      2. Is there any way to deactivate responsive function?
       
      If I could receive support from you to go thorough this process I would be happy to be a pro member. 
       
      Looking forward to hearing from you.
    • kwaoru
      By kwaoru
      Hi,
      I desperately need to deactivate the responsive function on mobile for reasons. It looks so messy with the responsive look on mobile and not navigating or informative at all as it is. 
      I searched for solutions online and tries some of those that I found but nothing worked out. Also I found a previous post on this forum says that this theme pagelines DMS is not meant to be build to deactivate the responsive function... 
      Also tried with widget such as WPtouch to edit the mobile look a little more informative but as I am using "single page" theme on pagelines, the frontpage(main page) never appears on those app.
      Seems like not compatible?
      If there is no way to deactivate responsive function or I'll have to recreate another page just dedicated for a mobile page? or change the theme completely and build a page from scratch?
      I have been searching for this for two days already...
      Could anyone wise and kind out there, please help me?
       
      Thanks,
×