EmicoEcommerce / Magento2Tweakwise-archived

Magento 2 module for Tweakwise integration
Other
9 stars 25 forks source link

Isssue Tweakwise/Ajax Navigation filtering #230

Closed charlottegeven closed 2 years ago

charlottegeven commented 2 years ago

This issue occurs on paginated pages. As an example I use https://www.brabantia.com/nl/afval-verzamelen/afvalemmers-prullenbakken/. When you scroll down on this page and put the cursor on the '2', you will see that this page links to: https://www.brabantia.com/nl/tweakwise/ajax/navigation/?p=2

If you click through, however, the page will go to: https://www.brabantia.com/nl/afval-verzamelen/afvalemmers-prullenbakken/?p=2, which is correct.

The Ajax Navigation makes sure that certain parts of the page (like the products in this case), can be refreshed without reloading the whole page. JavaScript is used for this. The URL with 'tweakwise/ajax/navigation/' in it is only visible when JavaScript rendering is enabled.

So what's the problem?
The Google bot always passes by in two stages. We call these phases the first wave of crawling and the second wave of crawling.

As a result, Google sees two different situations in pagination. This leads to possible issues with the crawling of the website and with the link value being forwarded.

Solution The links to paginated pages must have the correct URL (for example: https://www.brabantia.com/nl/afval-verzamelen/afvalemmers-prullenbakken/?p=2 ) both without and with JavaScript rendering.

Environment

Steps to reproduce This issue occurs on paginated pages. As an example I use https://www.brabantia.com/nl/afval-verzamelen/afvalemmers-prullenbakken/. When you scroll down on this page and put the cursor on the '2', you will see that this page links to:

If you click through, however, the page will go to: https://www.brabantia.com/nl/afval-verzamelen/afvalemmers-prullenbakken/?p=2, which is correct.

The Ajax Navigation makes sure that certain parts of the page (like the products in this case), can be refreshed without reloading the whole page. JavaScript is used for this. The URL with 'tweakwise/ajax/navigation/' in it is only visible when JavaScript rendering is enabled.

So what's the problem?
The Google bot always passes by in two stages. We call these phases the first wave of crawling and the second wave of crawling.

As a result, Google sees two different situations in pagination. This leads to possible issues with the crawling of the website and with the link value being forwarded.

Solution The links to paginated pages must have the correct URL (for example: https://www.brabantia.com/nl/afval-verzamelen/afvalemmers-prullenbakken/?p=2 ) both without and with JavaScript rendering.

Hnto commented 2 years ago

@charlottegeven Thanks for mentioning this. I have created an internal issue for this. I can't promise it will be picked up asap but I'll be sure to update you.

charlottegeven commented 2 years ago

@Hnto Oke thank you, hope to hear it.