Maybe I found a bug with "Canonical" option:
If I choose to show canonical I cannot leave blank that field for some pages because is added automaticly!
Example:
I need only one page called:/archive to be canonical and I set a link on node edit page (in canonical meta tag area).
But I found later that ALL my site's pages have now a canonical link (directed to the pages themself!)
And so: my homepage has a canonical link to "homepage", my services page has a canonical link to "services" and so on...!!
Seems not be a correct behaviour! The Canonical should appear only where I choose a link for a particular node or I'm wrong?
Thanks!
Bye!
Comments
Comment #1
junipllc commentedAre you using the Global Redirect module? It, too, has canonical links. It is possible that GR is adding them and not this module.
Comment #2
dave reidCorrect, it's probably another module. I cannot duplicate this with the current 6.x-1.x-dev code.
Comment #3
kollo-dherbois commentedGlobal Redirect does not have such feature for Drupal6, it has in version for Drupal7
No it`s not another module. I (and you) can reproduce this "problem" with 6.x-1.11, but not with 6.x-1.x-dev code (which I didn`t) - why at all try with dev version if TS points to issue with version 6.x-1.11.
If you check "Canonical URL" in "Meta tags to output in HTML" tab here: admin/content/nodewords - then canonical url will be automatically printed for all nodes taking url from path alias of node (if you use aliases). Still you able set specific canonical url editing particular node and it will be printed as you want. It appears you cannot print canonical url meta for only choosen pages - meta will be printed for all nodes anyway. This is behaviour of version 6.x-1.11
I can`t see problem - since you set url aliase "services" why it shouldn`t be canonical?..
This is a problem. Seems you`ve set frontpage as "homepage" here admin/settings/site-information or with views or some other module... You should give more info how you made settings for frontpage.
Comment #4
kollo-dherbois commentedI was wrong with frontpage. Here is the problem: if you don`t specify ''Canonical URL'' for homepage here '/admin/content/nodewords/meta-tags/frontpage' then such meta getting printed in the code of homepage -
==link rel="canonical" href="http://example.com/admin/content/nodewords/meta-tags/frontpage"==
So probably filling canonical url here /admin/content/nodewords/meta-tags/frontpage would resolve frontpage problem of TS... Anyway be sure filling all the settings options for homepage there '/admin/content/nodewords/meta-tags/frontpage'.
This anyway indicates very strange user interface and settings behaviour of Nodewords 6.x-1.11. There should be proper readme file for recommended version of module.
Comment #5
damienmckennaComment #6
damienmckennaWhen Canonical URL field is set to be displayed, the front page should always display the correct URL in the canonical tag, even if you are viewing the front page's raw page rather than the / path.
To clarify this, on a site I have the site_frontpage variable set to 'front', which is a custom page built with Views. When I go to the site front page, e.g. http://example.com/, the meta tag is as follows:
<link rel="canonical" href="http://example.com/" />If I go to the "raw" Views page http://example.com/front (and do not have the GlobalRedirect module enabled), it loads the page correctly at that URL, does not redirect me to the front page, but the meta tag still shows:
<link rel="canonical" href="http://example.com/" />This is how it is supposed to work.
As for other pages, you should consider field as having an automatic default - it will automatically assign the current page's path (in the latest -dev code you have an option as to whether it shows the internal system path or the URL alias) unless you specifically manually override it either via a Custom Page setting or e.g. a node's edit form. Again, this is how it is supposed to work - you aren't loosing anything by informing the search engines that this page's content is only available at this URL.
That said, I have tweaked the description on the field a little to be more specific and give examples, per the enclosed patch.
Comment #7
damienmckennaThis was committed.