Hi the "Continue shopping" is not wroking with i8n.

It redirects the right page but inserts the Language like /DE in front of the aktuall path resulting in page not found.

CommentFileSizeAuthor
#7 1429756-i18n-cart-redirect.patch1.35 KBlongwave

Comments

longwave’s picture

Status: Active » Postponed (maintainer needs more info)

Do you have a link to a site that demonstrates this problem, or can you provide some more details about the URL that you came from, the URL that is redirect to, and the URL that you expect?

epawel’s picture

The problem is caused by $_SESSION['uc_cart_last_url'] =request_path() in uc_cart.module.
request_path() includes path prefix language code (you can see it in database table sessions) and that is why language prefix is duplicated in path.
I fixed it temporarliy in very ugly way : substr(request_path(), 3); (my language prefix is always 2 letters)
I hope it will help somebody.

longwave’s picture

Title: Continue Shopping with I8N » Continue Shopping with I8N duplicates language prefix
Status: Postponed (maintainer needs more info) » Active
longwave’s picture

Title: Continue Shopping with I8N duplicates language prefix » Continue Shopping with i18n duplicates language prefix

Fixing title

longwave’s picture

From a quick search of the issue queues, there are many similar issues with i18n and double prefixed paths in other modules.

A reasonably robust approach seems to be in this patch: http://drupal.org/files/issues/path_redirect-language-prefix-249432.patch
(from http://drupal.org/node/249432#comment-1215450)

longwave’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
Status: Active » Needs review
StatusFileSize
new1.35 KB

current_path() seems to work better than request_path().

longwave’s picture

Status: Needs review » Fixed

Committed #7

Status: Fixed » Closed (fixed)

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