For some reason cron will not complete with ctools activated (panels is the only ctools dependent module if that helps). I'm getting the Cron run exceeded the time limit and was aborted error on ctools (as is evidence by comparing a normal run with a failed run and outputting each module to watchdog upon completion).

Any suggestions?

Comments

Anonymous’s picture

A few more details....

This problem is only duplicated when running a scheduled cron via drupal.sh. Running cron manually or scheduled with something like wget seems to eliminate the problem. While this solution is addequate for now, I would like to find a remedy as I would rather run through drupal.sh.

epersonae2’s picture

This sounds suspiciously like a failure that I've been getting after updating from 1.2 to 1.3, although with poormanscron. I've had to fall back to prior versions (was upgrading multiple modules) twice now!

epersonae2’s picture

Scratch that for me, at least at the moment...narrowing down which updates I installed seems to point to ThemeKey as the culprit instead.

merlinofchaos’s picture

Can you paste the error you get?

dirtysteak’s picture

I'm also getting the time limit error as cron tries to work on ctools.

Everything was working fine until I uploaded and enabled mollom (spam prevention), which white-page-of-deathed the admin section of our site.

After deleting the mollum directory I've got the ctools hang up issue on cron. We usually set cron to run every 10 seconds as we work on the site, just to keep things clean. I've also tried clearing the cache.

Thanks,

DW

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

With no one posting actual error messages and just vague statements such as 'on ctools' it's pretty hard to have any idea what's going on here. Need more information, please.

brunodbo’s picture

Version: 6.x-1.3 » 6.x-1.8
Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Active

Similar error:

- When I run cron manually from /admin/reports/status, cron runs.
- When I run it using wget, it fails (sometimes, see below) with the following error:

Fatal error:  Class 'ctools_context_optional' not found in /path/to/ctools_style_plugin.inc on line x

Watchdog will show the 'cron time exceeded' message.

(The style plugin itself works fine. When I comment line x out, cron runs fine (using wget).)

Also, the error only occurs on one install. On my local install (same codebase), cron runs.

brunodbo’s picture

I was getting the above error today as well when clearing the cache manually.

I included context.inc by putting

ctools_include('context');

at the top of my style plugin, and the errors went away.

Perhaps out of scope for this issue: are contexts not supposed to be used in style plugins?

merlinofchaos’s picture

That's interesting. I don't think styles actually should be using contexts, as i don't think any context information is transmitted to them. I would need to know more about the style, and why it's referencing context information. Perhaps it's something you need to include in your style when it's used?

brunodbo’s picture

The style plugin allows the panels' admin to fill in a link (on the style's configuration screen), which is displayed as a 'More' link, next to the pane's title. The link can point to wherever: individual pages, a view that takes arguments, ... The link can (optionally) include tokens (keywords) from the user context, eg. in order to link to the user's blog from a pane on the user's profile page.

Context keyword substitution works fine from the style plugin, using ctools_context_keyword_substitute(), with or without ctools_include('context').

A style plugin seemed to be the most convenient (changing the pane's mark up, and providing the interface to input the link). Are there better ways to accomplish this?

merlinofchaos’s picture

Oh neat.

No, that's fine. I think you'll just have to ensure ctools_include('context') because from Panels' perspective, it doesn't think styles need contexts. But if they do, and they work for you, then that's great!