When you change the payment method in the checkout form, system messages are not shown. This makes it hard to debug problems.

Views does this by adding the system messages to the form output. Patch coming.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim created an issue. See original summary.

joachim’s picture

Status: Active » Needs review
FileSize
597 bytes
torgosPizza’s picture

Issue tags: +commerce-sprint

This seems reasonable enough. Would like to get some more eyes on it.

mglaman’s picture

Issue tags: +Needs manual testing

Updating tags. This requires some good old fashioned manual testing :)

torgosPizza’s picture

Status: Needs review » Reviewed & tested by the community

This does work for me, all system messages remain intact when dealing with Ajax panes in the form.

mglaman’s picture

Status: Reviewed & tested by the community » Needs review

Snippet from views/includes/ajax.inc. We're not checking if in AJAX, which it seems to be the issue here. The way error messages are handled by the form outside of AJAX should be working fine.

  if (!empty($form_state['ajax']) && (empty($form_state['executed']) || !empty($form_state['rerender']))) {
    // If the form didn't execute and we're using ajax, build up a
    // Ajax command list to execute.
    $commands = array();

    $display = '';
    if ($messages = theme('status_messages')) {
      $display = '<div class="views-messages">' . $messages . '</div>';
    }
    $display .= $output;

My one wonder would be: what about other panes that do AJAX, will it steal their messages? this might be an issue at core's message storage, but worthy question.

joelpittet’s picture

Likely will steal any message sent with drupal_set_message(). Though I'm not quite sure which would win. I have my messages in panels_everywhere pane.