issue with sitemap-extended plugin

vincent3569 Member, Translator

not sure so I prefer discuss on forum before create a ticket.

with sitemap-extended, I have this xml file /cache_html/sitemap/sitemap-zenphoto-index.xml.
In this file I can see the following code:

<urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
    <url>
        <loc>http://www.vincentbourganel.fr</loc>
        <lastmod>2017-10-17T09:46:16Z</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.9</priority>
    </url>
    <url>
        <loc>http://www.vincentbourganel.fr/page/2</loc>
        <lastmod>2017-10-17T09:46:16Z</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.9</priority>
    </url>
    <url>
        <loc>http://www.vincentbourganel.fr/page/3</loc>
        <lastmod>2017-10-17T09:46:16Z</lastmod>
        <changefreq>weekly</changefreq>
        <priority>0.9</priority>
    </url>
</urlset>

Comments

  • vincent3569 Member, Translator

    without rewrite token on gallery (this is my case on my prod site), I should have something like following:

    <urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
        <url>
            <loc>http://www.vincentbourganel.fr/page/gallery/</loc>
            <lastmod>2017-10-17T09:46:16Z</lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.9</priority>
        </url>
        <url>
            <loc>http://www.vincentbourganel.fr/page/gallery/2/</loc>
            <lastmod>2017-10-17T09:46:16Z</lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.9</priority>
        </url>
        <url>
            <loc>http://www.vincentbourganel.fr/page/gallery/3/</loc>
            <lastmod>2017-10-17T09:46:16Z</lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.9</priority>
        </url>
    </urlset>
    

    and of course, it should take into account the rewrited token for gallery page.

  • acrylian Administrator, Developer
    edited October 2017

    Since you have to manually set the page you want to use as the gallery index you can just enter the rewritten page name on the option.

    It does not support the rewrite token because you can use any other page (you need to make sure naturally that it makes sense ;-)) as well but those will not have any gallery token support.

  • vincent3569 Member, Translator

    I did a mistake in my previous post. the file should be like following

    <urlset xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
        <url>
            <loc>http://www.vincentbourganel.fr/</loc>
            <lastmod>2017-10-17T09:46:16Z</lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.9</priority>
        </url>
        <url>
            <loc>http://www.vincentbourganel.fr/page/gallery/</loc>
            <lastmod>2017-10-17T09:46:16Z</lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.9</priority>
        </url>
        <url>
            <loc>http://www.vincentbourganel.fr/page/gallery/2/</loc>
            <lastmod>2017-10-17T09:46:16Z</lastmod>
            <changefreq>weekly</changefreq>
            <priority>0.9</priority>
        </url>
        [...]
    </urlset>
    

    as we can have separted pages for index et gallery pages.

  • vincent3569 Member, Translator

    Since you have to manually set the page you want to use as the gallery index you can just enter the rewritten page name on the option.

    Sorry, I don't understand. According to you, where I have to enter the rewritten page name?
    There is non option like that in sitemap-extended plugin.

  • acrylian Administrator, Developer
    edited October 2017

    You have to do it in two places: The actual rewrite token on the rewriteToken plugin options and the option of the sitemap plugin so it know which is the gallery page to use.

    So if youe rewrite token is "galerie" instead of actual page name "gallery" enter it in both options for now.

    This naturally ony works if using modrewrite urls and it will be alwas /page/<yourname>. But seriously who nowadays would use non modrewrite links…

    I might take a look later to support the default gallery index "gallery" internally.

  • vincent3569 Member, Translator
    edited October 2017

    OK.
    Btw, it will be more consitant if sitemap-extended uses the theme option custom_index_page ('gallery' in my case).
    so we don't have to do nothing in sitemap-extended options.

  • acrylian Administrator, Developer
    edited October 2017

    Yes, might be that the plugin is older than this option, don't remember. I will put it on my list.

  • vincent3569 Member, Translator
    edited October 2017

    I have a test by adding 'gallery' in Gallery index page option of sitemap-extended, but nothing append in /cache_html/sitemap/sitemap-zenphoto-index.xml: the xml stays as the code above and I don't have any 'gallery' anywhere in sitemap xml files.

  • vincent3569 Member, Translator

    to finish, in the same way, the paginated items (news, cattegories, gallery and albums) are like that:

    news/1
    category/[category_name]/1
    page/2
    [album_name]/page/1
    

    as rewrited like are with a / at the end

    news/1/
    category/[category_name]/1/
    gallery/page/2/
    [album_name]/page/1/
    

    I don't know if it is correct or not.

  • acrylian Administrator, Developer

    Yes, they should. Actually both will work and should be redirected by htaccess.

  • acrylian Administrator, Developer

    Fix is up, please try as I also did some internal restucturing (does not change functionality, just for better internal organization).

  • vincent3569 Member, Translator

    It seems to be fixed.
    as usual, thanks :-)

Sign In or Register to comment.