Item in two different categories and canonical

More
10 years 6 months ago #46871 by Rooney
Ok. Thanks for the information. Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
10 years 5 months ago #47204 by ggppdk
Hello

i am not forgetting this,

the Joomla SEF plugin seems to be producing a valid REL canonical link, that works in all cases (just i will need to really test a little more)



- so obvious solution is to disable the FLEXIcontent built-in rel canonical in Joomla 3.x
(will do in v2.2.0 final)




- (to apply a fix now) you may comment out the FLEXIcontent code in files
com_flexicontent/views/.../tmpl/view.html.php
(search for rel="canonical") and comment it out

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
10 years 5 months ago #47211 by Rooney

ggppdk wrote: (to apply a fix now) you may comment out the FLEXIcontent code in files
com_flexicontent/views/.../tmpl/view.html.php
(search for rel="canonical") and comment it out

I don't think that's a good idea, because the in-built Joomla solution is not working for Flexicontent. I have articles listed in different category views. The FC canonical link always contains the primary category, the Joomla is built with the current category view. That means that one article has several different canonical links which makes the situation even worse compared to having no canonical at all!

So far I have deleted
Code:
public function onAfterRoute() { $app = JFactory::getApplication(); $doc = JFactory::getDocument(); if ($app->getName() != 'site' || $doc->getType() !== 'html') { return true; } $router = $app->getRouter(); $uri = clone JUri::getInstance(); $domain = $this->params->get('domain'); if ($domain === null || $domain === '') { $domain = $uri->toString(array('scheme', 'host', 'port')); } $parsed = $router->parse($uri); $fakelink = 'index.php?' . http_build_query($parsed); $link = $domain . JRoute::_($fakelink, false); if ($uri !== $link) { $doc->addHeadLink(htmlspecialchars($link), 'canonical'); } }
in plugins/system/sef/sef.php. Which is of course not an ideal solution, because sef.php is a core file!

Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
10 years 3 months ago #48797 by Rooney

ggppdk wrote: the Joomla SEF plugin seems to be producing a valid REL canonical link, that works in all cases (just i will need to really test a little more)

Hi,
this is still happening with latest 2.2.0 beta 1932. Still two canonical links in the head.
Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
10 years 3 months ago #48807 by ggppdk
Hello

yes, we need to provide the alternative SEF plugin (that extend existing one),

must put this in high priority, missed this


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
10 years 2 months ago #49510 by Rooney

ggppdk wrote: yes, we need to provide the alternative SEF plugin (that extend existing one),

must put this in high priority, missed this


As default there are still 2 canonical links added to the article (v2.2.0 r1955).
rooney

Joomla! 3.9.24 and FC 3.3.9

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.577 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline