I created an order form using webform module. My form contains select box. Default value of select box depends on GET variable - supposed to be the last argument in the path. Also I created 3 path aliases for: node/22/opt1, node/22/opt2 ,node/22/opt3. So we have:

0. defaul form page - http://site.name/order (sys path - node/22)
1. form state for the 1st select option - http://site.name/order/opt1 (alias)
2. form state for the 2nd select option - http://site.name/order/opt2 (alias)
3. form state for the 3rd select option - http://site.name/order/opt3 (alias)

It works fine. But, the problem is that canonical link is absolute only on the default form page - /order.
On all other pages it appears like "/order" instead of "http://site.name/order".

The same situation with shortlink.

Any ideas?
Thanks in advance.

Comments

DamienMcKenna’s picture

Status: Active » Closed (cannot reproduce)

Did you change the values of the Canonical URL fields, or do you have something else that changes the value of the tokens? The default global canonical URL value in beta4 is "[current-page:url:absolute]", which should.. be absolute :)

ACD’s picture

No, I didn't. I have [current-page:url:absolute] for canonical and [current-page:url:unaliased] for shortlink.

DamienMcKenna’s picture

Title: Canonical links are relative in some cases. » current-page:url tokens incorrect
Project: Metatag » Token
Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Status: Closed (cannot reproduce) » Active

Do you have the latest version of Token and Drupal core? These tokens come from Token, not Metatag, so if there's a problem with the tokens it should not be Metatag's fault.

ACD’s picture

Yes, I do. Drupal core - 7.17 and Token - 1.4

Dave Reid’s picture

Status: Active » Fixed

I think the problem here is that the $_GET variable setting the default value. The last argument in the path is not available to $_GET because it is not a query string. I think you might want to be using a token more like [current-page:url:unaliased:args:value:2].

Also using a module like http://drupal.org/project/subpathauto would avoid having to set aliases for each value since they would all resolve to the same URL.

Status: Fixed » Closed (fixed)

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