Warning: date_timezone_set() expects parameter 1 to be DateTime, boolean given in format_date() (line 1905 of /var/www/drupal-7.x-dev/includes/common.inc).
Warning: date_format() expects parameter 1 to be DateTime, boolean given in format_date() (line 1915 of /var/www/drupal-7.x-dev/includes/common.inc).
Warning: date_timezone_set() expects parameter 1 to be DateTime, boolean given in format_date() (line 1905 of /var/www/drupal-7.x-dev/includes/common.inc).
Warning: date_format() expects parameter 1 to be DateTime, boolean given in format_date() (line 1915 of /var/www/drupal-7.x-dev/includes/common.inc).

Comments

Eric-Alexander Schaefer’s picture

I think I found it.

    if (isset($form_state['values']['op']) && $form_state['values']['op'] == t('Preview')) {
      $defaults = new StdClass;
      $defaults->publish_on = $form_state['values']['publish_on'];
      $defaults->unpublish_on = $form_state['values']['unpublish_on'];
    }

The default values are coming from the form state when previewing. The form state value are strings, not integer timestamps. format_date() only eats timestamps. Why did this work in D6?

I will look into this tomorrow. Which is actually today over here... *yawn*

Eric-Alexander Schaefer’s picture

One more:

Notice: A non well formed numeric value encountered in scheduler_node_view() (line 539 of /var/www/drupal-7.x-dev/sites/all/modules/scheduler/scheduler.module).

Eric-Alexander Schaefer’s picture

Status: Active » Fixed

scheduler_preprocess_node() was the culprit. The there did not check if the scheduling values were numeric...

http://drupal.org/cvs?commit=487306

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Hitby’s picture

Status: Closed (fixed) » Active

Using the latest dev version - when previewing a node I get

Notice: A non well formed numeric value encountered in scheduler_node_view() (line 587 of /path/to/site/sites/all/modules/scheduler/scheduler.module).

Appreciate any help!

jonathan1055’s picture

Yes I had this too. It does need looking at. The link in #3 no longer shows the actual commit, but I found it here:

http://drupalcode.org/project/scheduler.git/commit/ed9baf6

Jonathan

jonathan1055’s picture

Priority: Critical » Normal

The problem raised in #5 was caused by scheduler_node_view(). Given that I already have a patch for that function in #1781186: Metatag googlebot:unavailable_after is written when node is shown in a view, panel or block I have modified the code to solve both problems, and created a new patch.

Jonathan

rickmanelius’s picture

Status: Active » Closed (duplicate)

I can confirm that with the patch in #1781186: Metatag googlebot:unavailable_after is written when node is shown in a view, panel or block, no issues arise. Feel free to re-open if this issue resurfaces.