Jump to content

Extension talk:AutoSitemap

About this board

$wgAutoSitemap erroring out entire wiki

2
Imjustcaden (talkcontribs)

putting the following in your localsettings.php seems to error out the whole wiki and return a 500 error.

$wgAutoSitemap["exclude_namespaces"] = [

    NS_TALK,

    NS_USER,   

    NS_USER_TALK,

    NS_PROJECT_TALK,

    NS_FILE_TALK,

    NS_MEDIAWIKI,   

    NS_MEDIAWIKI_TALK,

    NS_TEMPLATE,

    NS_TEMPLATE_TALK,

    NS_HELP,   

    NS_HELP_TALK,

    NS_CATEGORY_TALK

NS_FILE

];

Martynov Maxim (talkcontribs)

Well, apparently some of these namespaces does not exist. Follow this manual Manual:How to debug to detect which one is missing, and remove it from the LocalSettings.php

Manbu (talkcontribs)

At my spiritwiki.org i have 2100 pages.

I get pairs :   <url>

   <loc>https://spiritwiki.org/w/Datei:Chakrasamvara_Vajravarahi.jpg</loc>

   <priority>1.0</priority>

   <lastmod>2022-03-26T15:32:45Z</lastmod>

   <changefreq>weekly</changefreq>

  </url>

  <url>

   <loc>https://spiritwiki.org/w/Chakrasamvara</loc>

   <priority>1.0</priority>

   <lastmod>2023-02-12T22:11:57Z</lastmod>

   <changefreq>weekly</changefreq>

  </url>

and not all sites.

Martynov Maxim (talkcontribs)

What do you mean by "all sites"? Maybe "all pages"? What namespaces are used in your wiki instance?

Manbu (talkcontribs)

if You look at my wiki : The namespace is /w/ - all other is standard (i have now deactivated the plugin and use another sitemap)

P.S. In the wiki is a site 'All Pages'. Using the source-code of the wiki instead the code of this plugin would avoid such jpg-errors - and also would make the variable

$wgAutoSitemap["exclude_namespaces"] = [ superfluous.

Martynov Maxim (talkcontribs)

No idea what I've just read

Summary by Martynov Maxim

Added "How to debug" link to extension description

DevAny.KR (talkcontribs)

In multisite it appears as a blank page.

Martynov Maxim (talkcontribs)
TattooedLeprechaun (talkcontribs)
Martynov Maxim (talkcontribs)

Thanks for pull requests, merged

Trying to generate the sitemap.xml

2
Summary by Martynov Maxim

There is an answer in the extension docs

189.61.116.159 (talkcontribs)

Someone can help me pls. When I try to generate a new sitemap.xml when editig or creating a new page it shows up: Cannot write to sitemap.xml.tmpcb70ac9268d09b5dc17297441c9ff751.tmp.

Martynov Maxim (talkcontribs)

"Your MediaWiki folder should be permitted for write operations (chmod +w with chown apache or chown nginx)."

AutoSitemap_body.php on line 311

5
Summary by Martynov Maxim

Already described in documentation

Шариф Ахмет (talkcontribs)

In the error_log file of our site (https://sheki.org/wiki/Ana_s%C9%99hif%C9%99) , more than 100 such warnings appear in a few hours:

[17-Mar-2024 13:43:47 Asia/Baku] PHP Warning:  fopen(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/shekiwik/public_html/wiki/extensions/AutoSitemap/AutoSitemap_body.php on line 311

[17-Mar-2024 13:43:47 Asia/Baku] PHP Warning:  fopen(https://www.google.com/webmasters/sitemaps/ping?sitemap=https://sheki.org/wiki/sitemap.xml): Failed to open stream: no suitable wrapper could be found in /home/shekiwik/public_html/wiki/extensions/AutoSitemap/AutoSitemap_body.php on line 311...

Martynov Maxim (talkcontribs)

Try setting $wgAutoSitemap["notify"] = [] to disable notifying search engined like Google that sitemap file was updated.

Шариф Ахмет (talkcontribs)

I don't agree. Notice comes from "Google Webmasters":

[04-Apr-2024 10:35:38 Asia/Baku] PHP Warning: fopen(https://www.google.com/webmasters/sitemaps/ping?sitemap=https://sheki.org/wiki/sitemap.xml): failed to open stream: HTTP request failed! HTTP/1.0 404 Sitemaps ping is deprecated. See https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping. in /home/shekiafn/public_html/wiki/extensions/AutoSitemap/AutoSitemap_body.php on line 311 [04-Apr-2024 10:48:33 Asia/Baku] PHP Warning: fopen(https://www.google.com/webmasters/sitemaps/ping?sitemap=https://sheki.org/wiki/sitemap.xml): failed to open stream: HTTP request failed! HTTP/1.0 404 Sitemaps ping is deprecated. See https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping. in /home/shekiafn/public_html/wiki/extensions/AutoSitemap/AutoSitemap_body.php on line 311

Martynov Maxim (talkcontribs)

> I don't agree

What you don't agree with? Have you tried setting $wgAutoSitemap["notify"] = [];?

Шариф Ахмет (talkcontribs)

I did this 1 hour ago. No notification or warning has been received yet. Thanks.

How to exclude module?

2
Summary by Martynov Maxim

No data provided

Vladlen Terezhe (talkcontribs)

If i add in:

$wgAutoSitemap["exclude_namespaces"] = [

    NS_MODULE

Then my site stop working.

Martynov Maxim (talkcontribs)

HTTP rather than HTTPS sitemap

2
Summary by Martynov Maxim

Already described in documentation

2A02:C7C:5E03:3900:C99E:FD20:80DD:A076 (talkcontribs)

Hi,


The AutoSitemap extension is working but it only create links HTTP, all HTTP requests redirect to HTTPS. Is there any way to get the AutoSitemap extension to create HTTPS links to avoid redirection (which I am told is bad for SEO).


Thanks in Advance

Martynov Maxim (talkcontribs)

Have you read documentation of $wgAutoSitemap["server"] option?

This just kills the site and doesn't work wtf

4
Summary by Martynov Maxim

No data provided

168.1.201.119 (talkcontribs)

Dumb

168.1.201.119 (talkcontribs)

cant' delete this i got it working

168.1.201.119 (talkcontribs)

yea where does the sitemap even go? This appears to do nothing

Martynov Maxim (talkcontribs)

Please provide some information about your MediaWiki instance, like MW version, extension version, number of pages on your site, available RAM, debug logs.

How to exclude module from sitemap?

4
Vladlen Terezhe (talkcontribs)

Now my site includes modules in the sitemap and I want to fix it. Thanks you for attention. https://greenwiki.ru/sitemap.xml

Right now my exclude namespaces

$wgAutoSitemap["exclude_namespaces"] = [

    NS_TALK,

    NS_USER,   

    NS_USER_TALK,

    NS_PROJECT_TALK,

    NS_MEDIAWIKI,   

    NS_MEDIAWIKI_TALK,

    NS_TEMPLATE,

    NS_TEMPLATE_TALK,

    NS_SPECIAL,

    NS_HELP,   

    NS_HELP_TALK,

    NS_CATEGORY,

    NS_CATEGORY_TALK,

    NS_FILE,

    NS_MEDIA,

176.59.17.63 (talkcontribs)

You should add the custom namespace id to this option.

Vladlen Terezhe (talkcontribs)

Thanks. Where i can find more info about it?

Lotusccong (talkcontribs)