WPIntell

Source evidence

Conflict with Genesis themes

WP-Cron Control · support · 2017-09-04T09:58:00+00:00

complaintsentiment
mediumseverity
0.92relevance
4replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 35 rows with source links

20.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

28 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
wallyO unresolved
Just noticed Genesis was not saving SEO meta items from the edit page/post view. Trial and error pinpointed conflict with WP Cron Control. Disable WP Cron Control then Genesis SEO meta will save again. I read the other forum post about a similar problem with WP RSS Aggregator plugin . That forum post suggested an issue with DOING_CRON line 319 of wp-cron-control.php define( 'DOING_CRON', true ); may be the problem. It seems to be defining DOING_CRON to TRUE for ALL requests. It seems logical that you would only want to define DOING_CRON to TRUE for requests with the secret key, not every request. In the Genesis code at line 259 of genesis\lib\functions\options.php in the genesis_save_custom_fields() function is a check for DOING_CRON being TRUE if ( defined( 'DOING_CRON' ) && DOING_CRON ) { return; } So nothing is saved if DOING_CRON is TRUE. Same situation occurs in WP RSS Aggregator plugin. On line 328 of wp-rss-aggregator\includes\admin-metaboxes.php in the wprss_save_custom_fields() function if ( defined( 'DOING_CRON' ) && DOING_CRON ) return; The code is so similar that it must be a boilerplate for saving custom fields. So is the define( 'DOING_CRON', true ); in WP Cron Control really necesary for all requests? At this stage I don’t think it is. This topic was modified 8 years, 8 months ago by wallyO . After inspecting wp-includes/cron.php At line 348… function wp_cron() { // Prevent infinite loops caused by lack of wp-cron.php if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false || ( defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ) ) return; ... } It seem more than enough to just define… define( 'DISABLE_WP_CRON', true ); to prevent wp-cron from running. I am running into the same issue with another plugin. I have define( ‘DISABLE_WP_CRON’, true ); and I am still getting the same issue. Were you able to resolve yours? The only resolution I found to this problem is to edit WP Cron Control line 319 of wp-cron-control.php define( 'DOING_CRON', true ); to… // define( 'DOING_CRON', true ); As far as I understand, this line is to prevent spawn_cron() function from executing when called directly by other plugins. 4 lines below it on line 322 define( 'DISABLE_WP_CRON', true ); prevents wp-cron() from executing when initiated by a http request. This is a poor solution because it will have to be re-edited every time WP Cron Control plugin is updated. PS. you don’t have to define( ‘DISABLE_WP_CRON’, true ); The WP Cron Control plugin does this in its own code. This reply was modified 8 years, 8 months ago by wallyO . Hi @wallyo , Thank you for your update. I have implemented the patch and it seems to have cleared up the issue. Now just to see if all the scheduled tasks still work lol.

Comments

4 shown
wallyO 2017-09-05T04:46:00+00:00

After inspecting wp-includes/cron.php At line 348… function wp_cron() { // Prevent infinite loops caused by lack of wp-cron.php if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false || ( defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ) ) return; ... } It seem more than enough to just define… define( 'DISABLE_WP_CRON', true ); to prevent wp-cron from running.

taropaa 2017-09-13T03:03:00+00:00

I am running into the same issue with another plugin. I have define( ‘DISABLE_WP_CRON’, true ); and I am still getting the same issue. Were you able to resolve yours?

wallyO 2017-09-13T04:22:00+00:00

The only resolution I found to this problem is to edit WP Cron Control line 319 of wp-cron-control.php define( 'DOING_CRON', true ); to… // define( 'DOING_CRON', true ); As far as I understand, this line is to prevent spawn_cron() function from executing when called directly by other plugins. 4 lines below it on line 322 define( 'DISABLE_WP_CRON', true ); prevents wp-cron() from executing when initiated by a http request. This is a poor solution because it will have to be re-edited every time WP Cron Control plugin is updated. PS. you don’t have to define( ‘DISABLE_WP_CRON’, true ); The WP Cron Control plugin does this in its own code. This reply was modified 8 years, 8 months ago by wallyO .

taropaa 2017-09-13T15:47:00+00:00

Hi @wallyo , Thank you for your update. I have implemented the patch and it seems to have cleared up the issue. Now just to see if all the scheduled tasks still work lol.