The minimal installation profile doesn't create the Filtered HTML text format by default.

The messages displayed to the user fall back to the plain text format, that way all links to order pages are filtered out.

  else {
    $message = commerce_checkout_completion_message_default();

    if (filter_format_load('filtered_html')) {
      $text_format = 'filtered_html';
    }
    else {
      $text_format = 'plain_text';
    }
  }

Maybe there should be a warning that Filtered HTML is missing, perhaps at admin/reports/status page.

Comments

rszrama’s picture

Curious, not sure why this wasn't resolved by #1200420: Commerce assumes filtered_html exists, but it may not..

mr.baileys’s picture

Category: feature » bug
Status: Active » Needs review
StatusFileSize
new1.1 KB

Patch attached that falls back to a more sparse completion message (without links) when the Filtered HTML format is not available:

Your order is number [commerce-order:order-number]. You can view your order on your account page when logged in.

Nothing changes if the Filtered HTML format is available, or if the administrator has specifically set a completion message. Re-classifying as a bug since the currently all the links get escaped if you installed the minimal profile.

mr.baileys’s picture

StatusFileSize
new1.1 KB

Forgot to strip a t().

rszrama’s picture

Status: Needs review » Needs work

I may be wrong here, but I'm pretty sure we need all the strings to be wrapped in t() and not just the concatenated $message variable to ensure that the strings are properly extracted by the translation file creator. Technically we shouldn't be passing variables as the first argument to t(), only string literals for extraction purposes.

mr.baileys’s picture

Status: Needs work » Needs review
StatusFileSize
new1.09 KB

You're right...

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

rszrama’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

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