• Resolved Edgars

    (@itmedia24)


    Hello, wanted to leave a few things for you guys to fix / improve in Rank Math 404 Monitor:

    1. Bug: When browsing paginated pages in 404 Monitor with unfiltered results (e.g. page 2, page 7 and so on), when I click on “Hits” counter for a specific 404 error, I get a “The 404 error log is empty.” message, however there are records to show. They do not show because “paged” parameter gets passed to the “Hits” url and therefore if I see the “page 3” with unfiltered results, the “Hits” page will also open with a “page 3” and as the hits are not that much I’ll just get that error. You need to remove “paged” parameter from “Hits” url.
    2. Idea for Improvement: It would be a very good improvement if you could make the “Hits” column in “404 monitor” as sortable – that would allow to quickly find the most important errors with a lots of hits.

    Waiting for the good news,
    Regards, M24

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Edgars

    (@itmedia24)

    Also one more bug in 404 Monitor, when using it with WPML:

    When capturing 404 errors it does not save the language slug in the path which was not found. The reason behing this and also the solution is quite simple actually.

    On the file: /includes/modules/404-monitor/class-monitor.php on the method “capture_404” you use a simple “str_replace” function to get rid of the domain from the URL path / query string:

    $uri = str_replace( home_url( '/' ), '', $uri );

    This however is not the correct solution at all, because it can generate a lot of incorrect 404 paths:

    1. home_url() function returns the site domain along with the language code (e.g. https://sitedomain.tld/de/) which means with this approach we can’t see on which language the error happened when WPML or some other multi-language plugin is enabled.
    2. str_replace() function in this case replaces all the instances of the domain name in the url, e.g. if the url is https://sitedomain.tld/https://sitedomain.tld or https://sitedomain.tld/?https://sitedomain.tld it will result in a incorrect path registered on your “404 monitor”

    I’d advise you to rewrite this line to something more stable, like:

    $uri = parse_url($uri);
    $uri = (isset($uri['path']) ? $uri['path'] : '').(isset($uri['query']) ? '?'.$uri['query'] : '');
    $uri = isset($uri[0]) && $uri[0] === '/' ? mb_substr($uri, 1) : $uri;

    Or similar solution.

    • This reply was modified 1 year, 9 months ago by Edgars.
    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @itmedia24,

    Thank you for contacting the support.

    1. We are not able to replicate this on our end. Please record and share a screencast of the issue so we can replicate it on our end and investigate further. You can use a tool like https://loom.com/ to record and share the screencast.

    2. The Hits counter is already sortable. Can you please share some more details about the feature request?

    3. We are able to replicate it on our end and have logged it as a bug. We will inform you here once this is fixed.

    Looking forward to helping you.

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello,

    Assuming you are using the latest version of all the plugins, themes & WordPress and the issue is resolved, we are closing this support topic.

    If that is not the case, feel free to open a new support topic or reply to this one, and we will be more than happy to assist.

    Looking forward to helping you. Thank you.

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @itmedia24,

    Thank you for your patience.

    We released a quick Beta update you can try to see if that helps.

    Please enable the Beta update by following this:
    https://rankmath.com/kb/version-control/#beta-updates
    https://rankmath.com/wp-content/uploads/2020/02/Rank-Math-Beta-Testing.jpg

    If you are unable to see an update, please clear Rank Math’s transients from:
    WP Dashboard >> Rank Math >> Status & Tools >> Database Tools >> Remove Rank Math Transients >> Remove transients
    https://i.rankmath.com/Pbu5J6

    Please clear the caches from the server and WordPress after updating.

    You can disable the Beta updates once you update to the latest version and the issue is fixed.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘404 Monitor: Bugs and Improvements’ is closed to new replies.