I'm using beta12 and I have noticed that canonical isn't outputed as it should be. I need canonical mostly for views, since they create many duplicates and here is what I get:
www.example.com/view
Canonical for this page: displayed (www.example.com/view)
www.example.com/view?page=1
Canonical for this page: not displayed
The logic behind canonical is to display it primarily on duplicate pages and this way it's outputed only on originals. It worked great on 6-1.8 version except that canonical was displayed twice on original page if there were more pages. That is the reason I updated, but now I'm in problems since it isn't working.
Comments
Comment #1
1mundus commentedComment #2
Anonymous (not verified) commentedComment #3
Anonymous (not verified) commentedThat is not actually a bug, but the result of the used settings.
When you don't select the checkbox , meta tags will not be output for pages with a URL ending with a string such as (with N > 0).
The canonical URL is thought to be used to avoid reports about pages with duplicated meta tags; IMO, if you use that meta tags, then the option could be checked.
Comment #4
Anonymous (not verified) commentedI will add a setting that allow to set a canonical URL for those pages, similar to the setting that allow to set the content of the meta tag ROBOTS for those pages.
Comment #5
Anonymous (not verified) commentedI checked the last developed code, and the canonical URL should be output for pages with a pager, if the module is set to use the default meta tag values when a specific page doesn't have a meta tag value associated with.
As there is a setting for the meta tag ROBOTS value to use for those pages, I think that adding a similar setting for the canonical URL makes sense.
Comment #6
FortEZ commentedI have come across the need for a such a feature. Here is my scenario:
- I am using the canonical URL to determine what class the <body> tag will have
- When dealing with simple nodes, there is no issue: the canonical url can be set from the node edit page
- When dealing with pages from Views though, here is the issue:
(*) I have 2 URL aliases (mysite.com/cookbook and mysite.com/recipes) that point to the same page (generated from Views)
(*) When the user uses mysite.com/cookbook to enter the page, there is no issue, since the appropriate canonical URL is set
(*) When the user goes to mysite.com/recipes, the canonical url is not the same with before. Besides the obvious issue that, conceptually, the same page should have the same URL with any alias (isn't this the reason why canonical URLs were created in the first place?), there is also a practical issue: the <body> tag, does not get the appropriate class, and the page is not displayed properly...
Comment #7
ressaThanks kiam, I couldn't understand why pages with pagers, like http://example.com/path/example?page=455 were missing the Canonical URL. All I had to do was enable "Repeat meta tags for lists", and all the pages now have Canonical URL.
Thank you for all the energy you put into the Nodewords module, I really appreciate it.
Comment #8
1mundus commentedI forgot to reply here :(
Yes, the problem was in repeat meta tags for lists option. It works, as well as in current 1.x-dev version
Comment #9
damienmckennaCorrect me if I'm wrong, but this seems like it is a Feature Request rather than a Task, and given that it works as described now I'm changing this to a Normal priority.
Comment #10
Andrew Gorokhovets commented+1
Comment #11
damienmckennaThis option exists in the current v6.x-1.x branch, am marking it as being fixed.