WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] [closed] Errors in sitemap (72 posts)

  1. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm ok, so google throws a notice or error over those empty image:loc's i assume? Can you show me the error?

  2. tizz
    Member
    Posted 2 years ago #

  3. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm ok, this might be fixed by the dev version, could you try that?

    You can download the development version from here, or you can download it directly here.

  4. tizz
    Member
    Posted 2 years ago #

    I try, and I tell you. Thanks.

  5. treelabs
    Member
    Posted 2 years ago #

    Hi there,
    i got the same problem with sitemap.
    ****Version:1.2.2 - 1.2.3 - 1.2.4 (dev as well)
    Just categories sitemap is visible. Post sitemap and page sitemap are empty (blank)

    ****Version 1.2.5 (dev as well)
    Post sitemap: empty (blank)
    Pages sitemap:visible
    Categories sitemap:visibile

    I don't use nextgen plugis so i desume isn't a plugins incompatibility.

    In my opinion is a problem of calling CSS.

    Best

  6. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    @treelabs: link?

  7. treelabs
    Member
    Posted 2 years ago #

  8. tizz
    Member
    Posted 2 years ago #

    Here I am again. Installed dev version, and re-submitted the maps in GW.
    No more problems are signed in single maps (post and page), the general one still shows the 1.055 errors (the ex-two-maps total errors), but that's because it's still waiting to be send, I think.
    The strange thing is that in post-sitemap all images (1.058) haven't been sent (that's why there are no errors?), as if they were not detected.
    Well, I see that you removed <image:loc></image:loc> tag, and now is only "loc".

    P.S.; I confirm. Now general map has been sent and no errors, but that's because (I think) no images has been sent, like they were not visible.
    http://postimage.org/image/m81bm8tj1/

  9. treelabs
    Member
    Posted 2 years ago #

    @ Joost:

    in my case the problem with blank sitemaps came out for the first time with the big update of version 1.2.

    Before that versione everything was perfect.

    Best

  10. hostel
    Member
    Posted 2 years ago #

    Hi yoast, it was a very good plugin , but why you playing with new version, you just must say that ist a beta version, that we dont have to use in comercial sites, since the update 1.2 i have a lot of problem with the indexing, i lost 80% trafic and from top 10 in google rank now im on page 3 or 4, because of your plugin. before of the update 1.2 was every thing great but now i just angry about. please make sure that your plugin work other way just say that it must not be use on comercial websites.

  11. Freelander
    Member
    Posted 2 years ago #

    Hi I've tested your development version and looks like it's not parsing images anymore. I used to have empty <image:loc> tags now I don't have <image:loc> tags at all. Is this how it's supposed to be?

    Thanks for your help!

  12. tizz
    Member
    Posted 2 years ago #

    I see that you removed <image:loc></image:loc> tag, and now is only "loc"

    so images wasn't visible in maps with the dev version. Also, dev version returned 404 page not found errors in archives pages (category, tag...), whose second and following pages were no longer visible.
    So I returned to normal 1.2.5, re-submit maps, images are all sent but of course old 1.055 errors on <image:loc> tag are back again.

  13. bwinwithme
    Member
    Posted 2 years ago #

    Hello,

    After my wordpress seo plugin update i receive this message in my webmaster tools

    Sitemap is HTML

    Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead.

    Tag: html

    And here is my sitemap: http://bwinwithme.com/category-sitemap.xml

    Can somebody help me with this problem, thanks

  14. Aahan Krish
    Member
    Posted 2 years ago #

    @bwinwithme Your sitemap isn't loading. It's just showing the homepage. Something is wrong on your end, and probably not with the plugin, as it's working fine for me.

    Try disabling all plugins, and enabling them one-by-one to identify the culprit.

  15. bwinwithme
    Member
    Posted 2 years ago #

    @Aahan Krish I disable all the plugins and problem is still the same

  16. tizz
    Member
    Posted 2 years ago #

    I disable all the plugins and problem is still the same

    bwinwithme, if it's the same then it's not SEO Yoast plugin.
    Try again with all plugin disabled, defaut theme (Twenty Ten or Twenty Eleven), clear cache completely.
    I don't thimk your problem deal with this topic.

  17. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Tizz: please open a thread for nextgen. He hooks into my API but apparently does so in a wrong way sometimes. Going to resolve this as it works fine with normal galleries...

    bwinwithme: please open a new thread if your issues persist.

  18. Gunaxin
    Member
    Posted 2 years ago #

    Tizz,

    I have the same issue, and even if it's something NextGen did wrong, it was never an issue until these recent updates to this plugin. Plus Joost you tend to be more responsive, so if you can help us sort this out, it would be most appreciated.

    I don't really code, but I can typically work through problems and solve them eventually, but it just takes me way more time than someone who knows that they are doing. I've narrowed the problem down to the change in the sitemap_url function, and specifically it looks like the change from

    foreach( $url['images'] as $src => $img ) {
    to
    foreach ( $url['images'] as $img ) {

    and corresponding : htmlspecialchars( $src )
    which is now : esc_html( $img['src']

    When I swapped in the OLD function from 1.2.2, the sitemap images loc from NextGen works again. However the standard post images display 1,2,3,4 instead of their URL.

    So my guess is that something changed in the array somehow and your new function is pulling from an empty position in NextGen's generated array somehow? So assuming you don't want to edit your plugin, we need to figure out how to modify the NextGen sitemap.php to fix this issue. It's a very small file, and relatively easy to understand I assume. So I'll just paste it in here.

    class nggSitemaps {
    
        var $images	= false;
    
        /**
         * nggSitemaps::__construct()
         *
         * @return
         */
        function __construct() {
    
            add_filter('wpseo_sitemap_urlimages', array( &$this, 'add_wpseo_xml_sitemap_images'), 10, 2);
    
        }
    
        /**
         * Filter support for WordPress SEO by Yoast 0.4.0 or higher ( http://wordpress.org/extend/plugins/wordpress-seo/ )
         *
         * @since Version 1.8.0
         * @param array $images
         * @param int $post ID
         * @return array $image list of all founded images
         */
        function add_wpseo_xml_sitemap_images( $images, $post_id )  {
    
            $this->images = $images;
    
            // first get the content of the post/page
            $p = get_post($post_id);
    
            // Backward check for older images
            $p->post_content = NextGEN_Shortcodes::convert_shortcode($p->post_content);
    
            // Don't process the images in the normal way
      		remove_all_shortcodes();
    
            // We cannot parse at this point a album, just galleries & single images
            add_shortcode( 'singlepic', array(&$this, 'add_images' ) );
            add_shortcode( 'thumb', array(&$this, 'add_images' ) );
            add_shortcode( 'nggallery', array(&$this, 'add_gallery') );
            add_shortcode( 'imagebrowser', array(&$this, 'add_gallery' ) );
            add_shortcode( 'slideshow', array(&$this, 'add_gallery' ) );
    
            // Search now for shortcodes
            do_shortcode( $p->post_content );
    
            return $this->images;
        }
    
        /**
         * Parse the gallery/imagebrowser/slideshow shortcode and return all images into an array
         *
         * @param string $atts
         * @return
         */
        function add_gallery( $atts ) {
    
            global $wpdb;
    
            extract(shortcode_atts(array(
                'id'        => 0
            ), $atts ));
    
            // backward compat for user which uses the name instead, still deprecated
            if( !is_numeric($id) )
                $id = $wpdb->get_var( $wpdb->prepare ("SELECT gid FROM $wpdb->nggallery WHERE name = '%s' ", $id) );
    
            $images = nggdb::get_gallery($id, 'pid', 'ASC', true, 1000);
    
            foreach ($images as $image) {
                $src   = $image->imageURL;
                $newimage = array();
                if ( !empty($image->title) )
                    $newimage['title'] = $image->title;
                if ( !empty($image->alttext) )
                    $newimage['alt']   = $image->alttext;
                $this->images[$src] = $newimage;
            }
    
            return;
        }
    }
    $nggSitemaps = new nggSitemaps();

    Any help from anyone is appreciated.

  19. tizz
    Member
    Posted 2 years ago #

    I totally agree and vote for you Gunaxin, and for anyone who can help further.
    Following the Joost's advice I opened a thread in Nextgen support forum also, but the plugin author hasn't answered yet.

  20. ma9mwah
    Member
    Posted 2 years ago #

    i've fixed mine by adding the following line

    $newimage['src'] = $image->imageURL;

    just above the line

    $this->images[$src] = $newimage;

    in the add_gallery function in the ngg sitemap.php file

  21. trimark
    Member
    Posted 2 years ago #

    @ma9mwah - your solution fixed my problem. Thanks

  22. Gunaxin
    Member
    Posted 2 years ago #

    Excellent, works for me too. I probably should have dug a bit deeper, because that is about what I was thinking of trying. THANKS ma9mwah!

  23. tizz
    Member
    Posted 2 years ago #

    Works for me too.
    Thank you very much ma9mwah and Gunaxin!

  24. Freelander
    Member
    Posted 2 years ago #

    Works for me too. Thanks for sharing!

    Just a note, this solution doesn't work if you're using the development version of WordPress SEO.

  25. tizz
    Member
    Posted 2 years ago #

    @Freelander
    Probably it's because in development version <image:loc></image:loc> tag is missing.

  26. Ocala Website Designs
    Member
    Posted 2 years ago #

    @ma9mwah, that worked for me for 43 of the 46 errors, the 3 other errors are from images that are within a page that are being displayed using a shortcode. They don't display a link in the LOC tag. Any thoughts of where that would come from, i'm sure it's a similar fix?

    I guess I could use the wordpress way of embedding them, since it's only three images, instead but I like the shortcodes from ngg...

    Hopefully now that NGG is bought out from Photocrati, they will start working out some of the bugs a little faster.

    Thanks guys!

  27. ma9mwah
    Member
    Posted 2 years ago #

    try adding the same fix to the add_images function in the same file.

  28. helika
    Member
    Posted 2 years ago #

    @ma9mwah, thank you very much, your solution also worked for me (for empty image links in sitemap)!

  29. akdwivedi
    Member
    Posted 2 years ago #

    @ma9mwah, sorry for a basic question, I am having the same issue, but which file should I pick up? I am using the WordPress SEO plugin from Yoast and having same issue.

    Site: http://www.abhi.nl

  30. akdwivedi
    Member
    Posted 2 years ago #

    Just figured out that you did mention that its ngg sitemap.php file. I have updated for both functions in the same file and it works!!

    Thanks for the fix again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags