Canonical Link on paginated Pages | General - All in One SEO Pack Pro Forum | Support | Semper Plugins

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSS sp_TopicIcon
Canonical Link on paginated Pages
November 20, 2018
10:18 am
Avatar
Dennis Dieckmann
Member
AIOSEOP
Forum Posts: 4
Member Since:
September 7, 2018
sp_UserOfflineSmall Offline

Hello!

I have a problem with the Canonical Links on my website including Woocommerce Shop System on the paginated pages.

The following HTML Code is generated:

<!– All in One SEO Pack Pro 2.10.1 by Michael Torbert of Semper Fi Web Design[-1,-1] –>
<!– Debug-String: PXWCVDL6GVXIJEISXSOL1EAZ2WO –>
<link rel=’prev’ href=’https://www.domain.com/’ />

<link rel=’next’ href=’https://www.domain.com/page/3/’ />

<link rel=”canonical” href=”https://www.domain.com/2/” />

<!– /all in one seo pack pro –>

The canonical links is NOT valid and results in a 404 Page not found.

How can I fix that?

Thanks for taking your time to check this case.

If you need the real shop URL, I can send it via PM/Email.

 

Best Regards!

November 20, 2018
11:17 am
Avatar
Steve Mortiboy
Admin
Forum Posts: 2070
Member Since:
January 5, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

December 3, 2018
6:57 am
Avatar
Dennis Dieckmann
Member
AIOSEOP
Forum Posts: 4
Member Since:
September 7, 2018
sp_UserOfflineSmall Offline

Hi,

i have send a new e-mail with additional information.

I hope, we can get fixed that issue.

Thanks!

Best Regards!

December 3, 2018
10:35 am
Avatar
Dennis Dieckmann
Member
AIOSEOP
Forum Posts: 4
Member Since:
September 7, 2018
sp_UserOfflineSmall Offline

Just for public information, how the bug I can be reproduce (for woocommerce Webshops):

>> Confing: Startpage and Shoppage as the same page.

>> Go on the startpage (with the products) on the second page => Canonical Link broken.

For example: Product cateogries Canonical Links with pagination are working (also for tagging-archiv pages).

So, I come to the conclusion, it have to do with that setting “startpage” and “shoppage” together and the related “shop product archiv page”.

Related to this, there is another issue in the XML-Sitemap, which is OFF-Topic to this thread, so  I ingnore it for here.

December 3, 2018
10:48 am
Avatar
Steve Mortiboy
Admin
Forum Posts: 2070
Member Since:
January 5, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

December 13, 2018
8:42 pm
Avatar
Dennis Dieckmann
Member
AIOSEOP
Forum Posts: 4
Member Since:
September 7, 2018
sp_UserOfflineSmall Offline

Hi,

as this issue does bad on my website for SEO, I have checked the source code and find the following issue, which should be confirmed from the DEV-Team, as they know the source code better. But I think this should be the solution/reason:

File: aioseop_class.php

Function: function get_paged( $link )

Line: 2778

Code: $link = trailingslashit( $link ) . “$page”;

>> This can not work correct, as the $link is give to the function like “https://www.mydomain.com”. Even if you call the page https://www.mydomain.com/paged/2 the $link is not given in that way to the function.

Problem in the if-case:

Line: 2777 => if ( $page == get_query_var( ‘page’ ) ) {

The get_query_var(‘page’) is only true on FRONTPAGE (Startpage) and never worked on a “category” page. So, the source code is not working. The variable $link has not the full URL (parameter “paged” is not included), so the given code “trailingslashit( $link ) . “$page”; can NOT work.

Instead of this:

if ( $page == get_query_var( ‘page’ ) ) {
$link = trailingslashit( $link ) . “$page”;
} else {
$link = trailingslashit( $link ) . trailingslashit( $page_name ) . $page;
}

Just use:

if ( ! empty( $page ) && $page > 1 ) {
  $link = trailingslashit( $link ) . trailingslashit( $page_name ) . $page;
  $link = user_trailingslashit( $link, ‘paged’ );
}
>> I could not find any issue on my test-website with this source code. The variable $link has not a “page_name” (/paged/), so the above should always work. It should be checked and get LIVE as soon as possible please.

Best Regards,

Dennis Dieckmann

December 14, 2018
10:43 am
Avatar
Steve Mortiboy
Admin
Forum Posts: 2070
Member Since:
January 5, 2012
sp_UserOfflineSmall Offline

** You currently do not have permission to see this post. To obtain access to these Premium Support Forums, please purchase a plugin and support subscription from Semper Plugins **

Forum Timezone: America/New_York
Most Users Ever Online: 964
Currently Online:
38
Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 35
Members: 21714
Moderators: 0
Admins: 8
Forum Stats:
Groups: 4
Forums: 28
Topics: 2026
Posts: 8766
Newest Members:
Matthias Pflüger
Administrators: Michael TorbertPeter BayliesSupport TeamSteve MortiboyMatthew RobinsonSteve Klasen, Arnaud: 198Ashish Ravi
[i]
[i]
Skip to toolbar