Wrong url and title for all sub level of the site map

#20468
  • Resolved Admaker
    Rank Math free

    Hy team !
    Love your work but one little thing is that on my site map the first level work well but when i enter sub level like page it show wrong url and title, just a letter “h” with a link “my-domain.com/h” (the number of line is good)

    i have tested to go back to previous version, tested to update permalink, tested to update sitemap settings.
    noting has worked out

    i use elementor 2.6.7 pro 2.6.1
    on WP : 5.2.4

    Screenshot : https://zupimages.net/up/19/46/uvfr.png

    • This topic was modified 5 years ago by Admaker.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Michael Davis
    Rank Math pro

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    This suggests that there is a conflict with one of your installed plugins/theme. Could you please perform the diagnostic steps on the following page and let us know if you are able to isolate the culprit: https://rankmath.com/kb/check-plugin-conflicts/

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Admaker
    Rank Math free

    I had already tested this solution too, but I couldn’t find which plugin it came from last time because your sitemap only updates itself when there is a postupdate…

    Now I’ve found out where it comes from:
    The LoginDesigner plugin is involved
    His Version 1.1.12 work with Rankmath but the last 1.2.0 do not.

    I also contacted plugin support at this URL:
    https://wordpress.org/support/topic/conflict-with-rankmath-sitemap-xml/

    • This reply was modified 5 years ago by Admaker.
    • This reply was modified 5 years ago by Admaker.
    Michael Davis
    Rank Math pro

    Hello,

    Thank you for contacting Rank Math today.

    I am glad that you were able to identify the cause of the conflict. Please update us on how this goes, we would be happy to offer any help in fixing this.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Admaker
    Rank Math free

    the plugin developer need to use this hook instead no ? :

    He try to exclude the login-designer page from the sitemap.

    
    /**
     * Filter the URL Rank Math SEO uses in the XML sitemap.
     *
     * Note that only absolute local URLs are allowed as the check after this removes external URLs.
     *
     * @param string $url  URL to use in the XML sitemap
     * @param object $post Post object for the URL.
     */
    add_filter( 'rank_math/sitemap/xml_post_url', function( $url, $post){
    	return $url;
    }, 10, 2 );
    
    

    his function part :

    
    $page = Login_Designer()->get_login_designer_page();
    
    

    gave the full array of the post, then he extract the permalink from it.

    So one little question :
    Where is your hook for : $posts_to_exclude ?

    Tx in advance

    • This reply was modified 5 years ago by Admaker.
    • This reply was modified 5 years ago by Admaker.
    • This reply was modified 4 years, 12 months ago by Admaker.

    ## BUG PATCHED ##
    I think i have solve the problem.
    Can you just tell me if it’s the right way to do it :

    
    add_filter( 'rank_math/sitemap/entry', function( $url, $type, $object ) {
      // Pull the Login Designer page from options.
      $ldpage = Login_Designer()->get_login_designer_page();
      $ldurl = get_permalink( $ldpage );
      $type = $ldpage->post_type;
      if (($key = array_search($ldurl, $url)) !== false) {
        return FALSE;
      }
      return $url;
    
    }, 10, 3 );
    
    
    • This reply was modified 4 years, 12 months ago by Admaker.

    Hello,

    Thank you for contacting Rank Math today.

    I am glad that you were able to figure this out. The code looks like it should work smoothly.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi !
    after some debug it seems that the conflict is created by the filter implementation in the plugin (login designer)

    
    add_filter( 'rank_math/sitemap/entry', function( $url, $type, $object ) {
    
    	// Pull the Login Designer page from options.
    	$page = Login_Designer()->get_login_designer_page();
    	$url = get_permalink( $page );
    
    	return $url;
    
    }, 10, 3 );
    
    

    SUPPORT : https://wordpress.org/support/topic/conflict-with-rankmath-sitemap-xml/#post-12144940

    Did you see an error in the hook used ?
    I also checked your hook page but it is used the right way..
    https://rankmath.com/kb/filters-hooks-api-developer/#sitemap

    Hello,

    Thank you for contacting Rank Math and sorry for the huge delay.
    Your last response got stuck on our moderation queue which made it impossible to get back to you sooner.

    The last response on Custom Login Page Customizer – Login Designer support thread suggests that you were able to fix this. Please do let us know if we can help further.

    Looking forward to helping you. Thank you.

    ​​​​​​​

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this ticket.