× Here you can get community support related to Tag Meta.

Enterprise v. Doesn't work Self exclude canonical

More
9 years 1 month ago #3721 by admin
Just to update you,
I was finally able to setup the environment to replicate the issue:
<link href="http://localhost/joomla3/en/single-article.html" rel="canonical" />
  <link href="http://localhost/joomla3/el/article-categories/26-park-site/73-australian-parks-greek.html" rel="alternate" hreflang="el-GR" />
  <link href="http://localhost/joomla3/hu/article-categories/26-park-site/74-australian-parks-hungarian.html" rel="alternate" hreflang="hu-HU" />
  <link href="http://localhost/joomla3/en/single-article" rel="canonical" />

Now I will check the reason and will find a solution, hold on a little bit more.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago - 9 years 1 month ago #3722 by admin
I have completed the code trace, and I want to ask you again to set "Clear canonical link" to yes again.



With this option ALL existing rel "canonical" will be deleted and the new canonical added by a Tag Meta rule will be added just before the </head> tag (don't look at the same point in html code, search for the whole page). This worked for me, so if this is not your case send me an email at info(at)selfget.com.

Kind regards,
Luigi
Attachments:
Last edit: 9 years 1 month ago by admin.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago - 9 years 1 month ago #3723 by admin
As additional information, I have noticed that the description that I have provided for the "Self exclude canonical" option is not really clear (it even confused me after all this time). The current description is:

Self exclude canonical
Remove the 'canonical' link if the page corresponds to the link itself.


So you may think that is done for ANY site's page, but it is not so. Pages that don't match any Tag Meta rule will not be touched in any way. But if for the current page there is a rule and this rule has a rel canonical, with this option we can first check if the canonical is teh same as current URL, and avoid to add it (it is useless).
if ( ( !empty($items[$currentitem]->canonical) ) && ( !$this->excludeCanonical($currentfullurl, $items[$currentitem]->canonical) ) ) {...

So a better short description for that option could be:

Self exclude canonical
Skip the adding the 'canonical' link from a rule if the page corresponds to the link itself.


I will change in the next release.
Last edit: 9 years 1 month ago by admin.

Please Log in or Create an account to join the conversation.

  • praktik_man
  • praktik_man's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 1 month ago - 9 years 1 month ago #3724 by praktik_man
Replied by praktik_man on topic Enterprise v. Doesn't work Self exclude canonical
I set two first settings like on your screenshot to yes and It's work! I use search and find the canonical ink. Thank you.


the problem is solved ;)
Attachments:
Last edit: 9 years 1 month ago by praktik_man.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #3725 by admin
Happy to hear this, I promised you to fix the problem... done! :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.151 seconds