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

1mundus’s picture

Priority: Normal » Critical
Anonymous’s picture

Title: Canonical not outputed correctly » Canonical URL is not output correctly
Anonymous’s picture

Title: Canonical URL is not output correctly » Canonical URL is not output for pages with pager

That is not actually a bug, but the result of the used settings.

When you don't select the checkbox Repeat meta tags for lists, meta tags will not be output for pages with a URL ending with a string such as page=N (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 Repeat meta tags for lists could be checked.

Anonymous’s picture

Title: Canonical URL is not output for pages with pager » Add a setting for the canonical URL to use for pages with a pager
Category: bug » task

I 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.

Anonymous’s picture

I 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.

FortEZ’s picture

I 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...

ressa’s picture

Thanks 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.

1mundus’s picture

I 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

damienmckenna’s picture

Category: task » feature
Priority: Critical » Normal

Correct 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.

Andrew Gorokhovets’s picture

+1

damienmckenna’s picture

Status: Active » Fixed

This option exists in the current v6.x-1.x branch, am marking it as being fixed.

Status: Fixed » Closed (fixed)

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