- The error occurs only on multilanguage sites after a language switch.
- The error occurs for anonymous visitors and logged-in users.

See the screenshot after a switch from English to German. The page is correct in German, but the checkout progress content is in English.
The same occurs after a switch from German to English.

Screenshot
Wrong language use on checkout

Cause of the error

The problem is the cache use with the function commerce_checkout_progress_get_items($refresh = FALSE).

This function is called in the function commerce_checkout_progress_block_view() to display the checkout progress content.

    if ($visible) {
      // Get non-empty pages.
      $pages = commerce_checkout_progress_get_items();
      $content = array(
        '#theme' => 'commerce_checkout_progress_list',
        '#items' => $pages,
        '#type' => variable_get('commerce_checkout_progress_list_type', 'ol'),
        '#current_page' => $page_id,
        '#link' => variable_get('commerce_checkout_progress_link', TRUE),
      );
      return array(
        'subject' => '',
        'content' => $content,
      );
    }

A simple use of the $refresh parameter with the value TRUE

      // Get non-empty pages.
      $pages = commerce_checkout_progress_get_items(TRUE);

solves the problem. The progress content are correct displayed after language switches.

With this scenario is the implemented cache function meaningless.

CommentFileSizeAuthor
wrong_language_use_on_checkout.jpg40.79 KBquiptime
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcisio’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Closed (duplicate)

This was fixed a few months in the latest dev snapshot. Please use the dev instead of 1.1.

quiptime’s picture

This was fixed a few months in the latest dev snapshot. Please use the dev instead of 1.1.

Very good, it's fixed. But, one of Drupals contributions rules says: Never prompt users to use an development release.

And, dev releases can not use the translation features from localize.drupal.org!

fixed a few months

I think it is time for the next stable version.

Note: See my issue Optimized checkout display (on small devices) - patch

jcisio’s picture

Not only this one but also a few bugfixes et features were added a few months ago. However I only have push permission, I can't create a new release even I think we should. I'll ask for permission or ask other maintainers do it.

quiptime’s picture

To contribute the next stable version 7.x-1.2 you must only create a new tag.

In a terminal:

git checkout 7.x-1.x
git tag 7.x-1.2
git push origin 7.x-1.2

Go to the project page.
Wait 10 minutes or so and then "Administer releases" (at the bottom of the project page) to make available 7.x-1.2 on the project page.

That,s all.

You can't create new tags?

jcisio’s picture

I don't have "Administer releases" permission in this project, i.e. I can't create new release node. So, tagging and push won't help ;)

quiptime’s picture

I think i can help you a little bit.

Can you give me co-maintainer permission - user quiptime?
Set all checkboxes to configure my co-maintainer permission (You can do this temporarily).

Let's try it, if it works.

jcisio’s picture

I don't have "Administer releases" permission. And logically I don't have "Administer maintainers" neither. So I can't add you. I think there is nothing we can't do now. I'm waiting for a maintainer with proper permissions to fix it.

quiptime’s picture

Please see #6

webmasterkai’s picture

jcisio, you have "Administer releases" permission now.

jcisio’s picture

Thanks webmasterkai. So I guess I can go ahead and create a new release very soon ;)

quiptime’s picture

Thanks @webmasterkai