*

webcity

  • *****
  • 253 posts
canonical support not working for page 2+
« on: December 07, 2020, 03:07:31 PM »
Hi,

Thanks for the osclass v4.2.0 update.

When I go to: https://demo.osclasspoint.com/for-sale/2 which is page 2 of the "for sale" category it shows the following canonical:
<link rel="canonical" href="https://demo.osclasspoint.com/for-sale"/>

It should be <link rel="canonical" href="https://demo.osclasspoint.com/for-sale/2"/>

Can you suggest a solution?

Many thanks

*

MB Themes

Re: canonical support not working for page 2+
« Reply #1 on: December 08, 2020, 03:41:39 PM »
@webcity
I do not think pagination should be considered in canonical URLs, you may find canonical URL generation in oc-includes/osclass/controller/search.php and modify it by your needs.

Code: [Select]
        if( Params::getParam('iPage') > 1 ) {
          $this->_exportVariableToView('canonical', osc_base_url() . $search_uri);
        }
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots