- 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
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.
Comment | File | Size | Author |
---|
Comments
Comment #1
jcisio CreditAttribution: jcisio commentedThis was fixed a few months in the latest dev snapshot. Please use the dev instead of 1.1.
Comment #2
quiptime CreditAttribution: quiptime commentedVery 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!
I think it is time for the next stable version.
Note: See my issue Optimized checkout display (on small devices) - patch
Comment #3
jcisio CreditAttribution: jcisio commentedNot 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.
Comment #4
quiptime CreditAttribution: quiptime commentedTo contribute the next stable version 7.x-1.2 you must only create a new tag.
In a terminal:
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?
Comment #5
jcisio CreditAttribution: jcisio commentedI 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 ;)
Comment #6
quiptime CreditAttribution: quiptime commentedI 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.
Comment #7
jcisio CreditAttribution: jcisio commentedI 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.
Comment #8
quiptime CreditAttribution: quiptime commentedPlease see #6
Comment #9
webmasterkai CreditAttribution: webmasterkai commentedjcisio, you have "Administer releases" permission now.
Comment #10
jcisio CreditAttribution: jcisio commentedThanks webmasterkai. So I guess I can go ahead and create a new release very soon ;)
Comment #11
quiptime CreditAttribution: quiptime commentedThanks @webmasterkai