Jump to content
jkfromk

CiviCrm + Pagelines = No Cron

Recommended Posts

jkfromk    0
jkfromk

I am testing a CiviCrm with PageLines (lite) before I purchase the pro. When trying to access the Cron.php (accessed by:  utility to run scheduled jobs I am getting the following PHP error: 

 

Fatal error: Call to a member function pagelines_register_sections() on a non-object in 

 

It is referencing the following file / line number: /wp-content/themes/pagelines/includes/class.sections.php on line 79

 

CiviCrm Module: <siteroot>/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=userk&pass=pass&key=key)

 

I don't get this error using other themes however really like the Pagelines theme and want to purchase if I can get it working together with CiviCrm.

 

Any ideas? 

 

 

Share this post


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

I've never used civicrm, but that pagelines error message would make me think the pagelines sections plugin isn't activated. You should see a message/prompt to activate this in Pagelines>store


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
jkfromk    0
jkfromk

I was thinking along the same lines however have confirmed that "Sections" is installed and activated. I am wondering if it has to do w/ accessing via the Plugin path:    <siteroot>/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=userk&pass=pass&key=key)  and Pagelines doesn't know how to handle?

Share this post


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

I'm not sure to be honest, I'll ask one of our developers to see if he can advise on the above for you.


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
James B    436
James B

I'd also suggest checking with civicrm and seeing if they have any ideas on the error message, they'd probably have seen it before on other platforms and might be able to advise too :-)


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
jkfromk    0
jkfromk

Thanks for the replies. I have an inquiry in w/ CiviCrm as well.  

Share this post


Link to post
Share on other sites
jkfromk    0
jkfromk

No luck on the CiviCrm site at all. In looking at class.sections.php ln 79 I see:

 

 

function set_section_info(){
 
global $load_sections;
Ln 79 $available = $load_sections->pagelines_register_sections( false, true );
 
$type = $this->section_install_type( $available );
 
global $load_sections;
Ln 84 $available = $load_sections->pagelines_register_sections( false, true );
$this->sinfo = $available[$type][$this->class_name];
 
If I comment ln 79 it throws same error on ln 84. Then commenting 84 the error goes away but I wonder what the issue is as I can't tell what is broken in the test site. 
 
Any ideas as to the cause or possible work-around? 

Share this post


Link to post
Share on other sites
jkfromk    0
jkfromk

seems if these lines are commented the slider and twitter feed sections don't work the same. 

Share this post


Link to post
Share on other sites
Simon    247
Simon

You shouldn't be editing the framework.

 

That plugin, if you can call it that, is loading a minimal wordpress to allow you to authenticate, then it runs the cron script. Trouble is, it does not need the whole of wordpress, and all its plugin and the loaded theme JUST to authenticate the user for a cronjob!!

So basically, the authors are just doing it wrong, well, they couldn't find a better way to do it ;)

 

Here is a working 'fix'

 

https://gist.github.com/Pross/5111864

 

Plus you have to add this to cron.php

 

define( 'CRMCRON', true );

Share this post


Link to post
Share on other sites
Simon    247
Simon

This 'hack' is not supported in any way shape or form.

Share this post


Link to post
Share on other sites
jkfromk    0
jkfromk

Thanks for the hack, I sincerely appreciate it.  To be sure, can you confirm the file referenced here: // Add this to wp-content/mu-plugins/crm.php

 

 

Do I create that file or add? I ask because I don't see that file currently. 

Share this post


Link to post
Share on other sites
Simon    247
Simon

create it.

Share this post


Link to post
Share on other sites
jkfromk    0
jkfromk

I believe I have done as instructed but am now getting error in crm.php across the entire site.  To prevent site-wide issue I took out crm.php out of mu-plugins and added: require_once '/path/to/crm.php'; to the cron.php file.  The error now is: 

 

Fatal error: Class 'Fix_CRM_Cron' not found on line 20 (crm.php)

 

 

This same error occurs if I access the crm.php directly. 

Share this post


Link to post
Share on other sites
Simon    247
Simon

The code does work; I tested it myself. Feel free to post the code to the CRM support site, they might be able to help you.

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

    • sierrapat
      By sierrapat
      I am using CiviCRM for Wordpress plugin with Pagelines. A contribution page is enabled via a shorcode in a Page, and works fine. The resulting Confirmation/Thank you page is supposed to display using the template of another page, such as the About Us page. Instead of displaying the text in the Content section, it is instead displayed at the top of the page, right under the <Head> tag. The other elements of the templage appear below, including the blank Content secdtion.
       
      How can Pagelines be tweaked to correctly display the text in the Content section of the selected page?
       
      Thanks...  Pat
       
      p.s. Using WP 3.8 with Pagelines 2.4.4 and Civi 4.4.1
       
    • go9media
      By 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!
    • eidoander
      By eidoander
      I am using latest version of Frameworks. I have installed a new plugin called CiviCRM (It's an open source project: http://civicrm.org/aboutcivicrm). The plugin is a full-featured constituent management software for WP. It works very well exceptI have an issue: when I create a donation page in the plugin, the plugin automatically assigns whatever template is used for the splash page. In other words, if my Splash landing page is Template 1, then my donation page is Template 1. I have changed this around several times just to see what happens. Unfortunately, I want my landing page to look a certain way and it is incompatible with the way the donation page needs to look. Nothing shows up in the Pagelines admin area for CiviCRM pages and I can find no settings in CiviCRM for template assignments. How can I manually find the code for this page assignment and assign a different page template to the CiviCRM pages? Any thoughts anyone? Here's a link to the page I need to reassign to a different template: http://www.lifechallengesemi.org/?page=CiviCRM&q=civicrm/contribute/transact&reset=1&id=2
×