? Failure

User tests: Successful: Unsuccessful:

avatar extjoom
extjoom
9 Oct 2014

.

avatar extjoom extjoom - open - 9 Oct 2014
avatar jissues-bot jissues-bot - change - 9 Oct 2014
Labels Added: ?
avatar infograf768
infograf768 - comment - 9 Oct 2014

Please give test instructions to reproduce the issue.

avatar infograf768
infograf768 - comment - 9 Oct 2014

@test
This works here.
Please update your code for style:

        if ($uri !== $link)
        {
            $fragment_link = strpos($link, "?");
            $link = $fragment_link > 1 ? substr($link, 0, $fragment_link) : $link;
            $doc->addHeadLink(htmlspecialchars($link), 'canonical');
        }
avatar brianteeman brianteeman - change - 10 Oct 2014
Category SEF
avatar brianteeman brianteeman - change - 10 Oct 2014
The description was changed
avatar Hackwar
Hackwar - comment - 13 Oct 2014

I disagree with this. I would say that the canonical URL for a page includes the pagination. In any case, this would break non-SEF URLs, since you are cropping everything after the ?. If you have index.php?option=com_content&view=article&id=42, then your canonical URL would be index.php.

avatar Hackwar
Hackwar - comment - 13 Oct 2014

It would be best if we added the canonical URL in the respective component and not do this via a plugin on a hunch, in general.

avatar cycleos
cycleos - comment - 14 Oct 2014
avatar infograf768
infograf768 - comment - 15 Oct 2014

Agree. Closing

avatar infograf768 infograf768 - close - 15 Oct 2014
avatar infograf768 infograf768 - change - 15 Oct 2014
Title
Delete duplicates of pages
Incorrect canonical when using pagination
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2014-10-15 06:55:00

Add a Comment

Login with GitHub to post a comment