We have scheduler associated with an event content type. Both publishing and unpublishing is allowed but not required.

Trying to add a new event or edit an existing one without scheduling still requires an unpublish date for the form to be submitted.

Comments

jonathan1055’s picture

Priority: Major » Normal

Hi,
Sorry to hear you are having a difficulty. This is generally working for others, so my first thoughts are:

  1. You say that an unpublish date is required - is it just an unpublish date, or are both dates being asked for (incorrectly)
  2. It may be a clash with other modules you are using which somehow alters the validation being done. Can you suggest any other modules which might be causing this?
  3. Possibly your variable table has somehow got the wrong values in it. Do you have the devel module? This allows you to see the variable table, or run php, or you could create a node with php input and print variable_get('scheduler_publish_required_aaa', 'not set'); and replace 'aaa' with the content type in question. Do the same with 'scheduler_unpublish_required_aaa'

Jonathan

emersonweb’s picture

Jonathan, thanks for responding.

1. I am only prompted for the unpublish date; no entries are made to either field.
2. I will investigate -- but it something I only noticed after upgrading to 1.8.
3. The "required" vars do not appear in the database for the content type -- just publish_enable, publish_touch, and unpublish_enable.

Thanks!

jonathan1055’s picture

With 3. what are the exact variable names in the table? The names should all start scheduler_...
Also 4. Can you check you have run a db update? The new variables should all exist (they are created for each content type in db update 6101)

Jonathan

emersonweb’s picture

These are all names in the variables table for the content type with which I am contending

scheduler_publish_enable_event, i:1;
scheduler_publish_touch_event, i:1;
scheduler_unpublish_enable_event, i:1;

DB Update reports no update for scheduler, last entry is 6101.

Thanks!

Jason

jonathan1055’s picture

Hi Jason,
Is this still a problem? Your variable table seems fine - if scheduling is not required and you have not edited the content type yet, then the 'required' entries will not exist.

If you can edit the scheduler.module file, can you search in scheduler_form_alter() for the following:

$unpublishing_required = variable_get('scheduler_unpublish_required_'. $form['type']['#value'], 0) == 1;

then add just after:

drupal_set_message('$form[type][#value] = ' . $form['type']['#value']);
drupal_set_message('$unpublishing_required = ' . $unpublishing_required);

That should show if the value is being set correctly by scheduler when the form is built.
Jonathan

Jonathan

jonathan1055’s picture

Status: Active » Closed (works as designed)

No response to my prompt five weeks ago, and nothing since Oct 2011.

Closing with 'works as designed' but please re-open if you still have a problem.

Jonathan