• Resolved Apfelbiss

    (@apfelbiss)


    Hello,

    I recognized, that the rel=”prev” and rel=”next” links (and even the canonical link at property=”og:url”) in the head of search pages are showing wrong URLs – as pretty links, that we don’t use for search results.

    Tested on a local test installation with:

    • WordPress 5.1 DE
    • WooCommerce 3.5.6 (with demo products and one duplicated product to get a second search results page)
    • WooCommerce Blocks 1.4.0
    • Yoast SEO 9.7
    • Theme: Storefront 2.4.3

    The problems:

    1.) E.g. as next link for
    https://mydomain.com/page/2/?s=test&post_type=product
    it is showing
    https://mydomain.com/search/test/page/2/.

    The links are working, but are only showing the normal WordPress search results, and not the WooCommerce product results (please note the “&post_type=product” in the correct link, that is missing in the pretty link).

    2.) When linking to a certain category, the pretty link is also “forgetting” the category info, e.g. as next link for
    https://mydomain.com/shop/category-title/page/2/?s=test&post_type=product
    it is still only showing
    https://mydomain.com/search/test/page/2/.

    3.) And a third problem, that results from the missing “&post_type=product” in the pretty link:
    Because of different settings, how many search results are shown on WordPress and on WooCommerce-only search results, the “next”-link can link to a 404 error page, e.g.:

    • 13 search results
    • 2 search pages for WooCommerce search, when 12 results on every page
    • 1 search page forWordPress search, when 18 results on every page

    Therefore, when the “next”-link in the source code of the WooCommerce result page links to “https://mydomain.com/search/test/page/2/”, this links to a 404 error page.

    • This topic was modified 6 years ago by Apfelbiss.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Pcosta88

    (@pcosta88)

    Hi

    You identified several issues. We have responded to them below.

    1. WooCommerce Paginated Search Pages Not Showing Rel/Prev
    Thank you for bringing this issue to our attention. We apologize for the trouble you are experiencing with our plugin. An issue report is currently open with our development team for this issue.

    We suggest commenting on the issue here: https://github.com/Yoast/wordpress-seo/issues/12463 so you may be kept aware of updates. You may need an account in order to post.

    2. WooCommerce Paginated Search Pages Not Showing og:url
    Thank you for bringing this issue to our attention. We apologize for the trouble you are experiencing with our plugin. An issue report is currently open with our development team for this issue.

    We suggest commenting on the issue here: https://github.com/Yoast/wordpress-seo/issues/12464 so you may be kept aware of updates. You may need an account in order to post.

    3. When linking to a certain category, the pretty link is also “forgetting” the category info, e.g. as next link for.
    This is probably related to the above two issues, however, we are confused. How is that product-category search page being generated? Do you have some kind of different search function that only searches product categories (rather than products)? Are you able to take a screenshot? You can use a tool like: https://pasteboard.co/ to share the image.

    4. WordPress and on WooCommerce-only search results, the “next”-link can link to a 404 error page,
    We understand that a WooCommerce Product Search and a regular WordPress Site Search can show different paginated results. However, we would not expect the rel or prev in the source code to go to 404 in either search.

    We would like some more information.

    A. Can you confirm you are using the most recent Yoast SEO Premium, v10.0.1? If you update, does the issue resolve? This guide explains more about how to update: https://kb.yoast.com/kb/how-can-i-update-my-premium-plugin/.

    B. Can you confirm you are using WordPress 5.1.1? You can check by clicking on the W in the top left and selecting About. If you need to update, please check with your host provider.?Please know that if you are using an older version of WordPress Core you may experience unexpected behavior with Yoast.?This guide explains more:?https://yoast.com/why-we-dont-support-old-wordpress-versions/.

    C. Are all your non-Yoast plugins and themes also updated?

    D. Are you able to take a screenshot of these issues or provide some example URLs? You can use a tool like: https://pasteboard.co/ to share the image.

    • This reply was modified 6 years ago by Pcosta88.
    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Wrong Prev/Next-Links on search pages’ is closed to new replies.