Extension talk:AutoSitemap

Jump to navigation Jump to search

About this board

DataBase error after adding a new namespace to exclude

6
Nicolas NALLET (talkcontribs)

When I add a new namespace to exclude in $wgAutoSitemap["exclude_namespaces"] = like

NS_WIDGET

and after when I try to edit a page on the wiki I get a database error.

Martynov Maxim (talkcontribs)

Can you attach trace log with debug mode enabled?

Nicolas NALLET (talkcontribs)

You can create an account on https://domotiki.eu and try to edit a page to see the full erro message

See https://domotiki.eu/domotique/Special:Version

Database error

A database query error has occurred. This may indicate a bug in the software.

[15d59b6bbc7b1e30c4d8f1f7] /index.php?title=Bac_%C3%A0_sable&action=submit Wikimedia\Rdbms\DBQueryError from line 1075 of /srv/data/web/vhosts/domotiki.eu/htdocs/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT "Popularpages" AS type,

page_id AS id,

page_namespace AS namespace,

page_title AS title,

( MAX( rev_timestamp ) ) AS last_modification,

rev_timestamp AS value

FROM

`page`,

`revision`

WHERE

page_is_redirect = 0

AND rev_page = page_id

AND page_namespace NOT IN (5,7,8,9,10,11,12,13,15,6,NS_WIDGET)

GROUP BY page_id

Function: Wikimedia\Rdbms\Database::query

Error: 1054 Unknown column 'NS_WIDGET' in 'where clause' (localhost)

Backtrace:

#0 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/libs/rdbms/database/Database.php(933): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)

#1 /srv/data/web/vhosts/domotiki.eu/htdocs/extensions/AutoSitemap/AutoSitemap_body.php(104): Wikimedia\Rdbms\Database->query(string)

#2 [internal function]: AutoSitemap::writeSitemap(Revision, string, string)

#3 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/Hooks.php(186): call_user_func_array(string, array)

#4 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/Revision.php(1511): Hooks::run(string, array)

#5 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/page/WikiPage.php(1716): Revision->insertOn(Wikimedia\Rdbms\DatabaseMysqli)

#6 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/page/WikiPage.php(1619): WikiPage->doModify(WikitextContent, integer, User, string, array)

#7 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/EditPage.php(2161): WikiPage->doEditContent(WikitextContent, string, integer, boolean, User, string, array, integer)

#8 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/EditPage.php(1493): EditPage->internalAttemptSave(array, boolean)

#9 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/EditPage.php(637): EditPage->attemptSave(array)

#10 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/actions/EditAction.php(59): EditPage->edit()

#11 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/actions/SubmitAction.php(38): EditAction->show()

#12 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/MediaWiki.php(499): SubmitAction->show()

#13 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/MediaWiki.php(293): MediaWiki->performAction(Article, Title)

#14 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/MediaWiki.php(862): MediaWiki->performRequest()

#15 /srv/data/web/vhosts/domotiki.eu/htdocs/includes/MediaWiki.php(523): MediaWiki->main()

#16 /srv/data/web/vhosts/domotiki.eu/htdocs/index.php(43): MediaWiki->run()

#17 {main}

Martynov Maxim (talkcontribs)

I guess that you added new namespace in wrong way. NS_* are numeric constants, but in your case it is a string because PHP understand this unknown value as a string.

You should add new namespace properly.

Nicolas NALLET (talkcontribs)

When I try

php maintenance/eval.php

> var_dump(NS_WIDGET);

I get

int(274)

Martynov Maxim (talkcontribs)

Add something like var_dump(NS_WIDGET); into LocalSettings.php before passing this namespace into an extension, and give an output here.

Reply to "DataBase error after adding a new namespace to exclude"

Exlude some other pages from sitemap

5
Fokebox (talkcontribs)

Hello all. Thank you for the extension. It works fine. I would like to know if it is possible to exclude some other pages at my wiki. For example I have my own namespaces "MiWiki:Article name" So I would like to exclude all pages with this namespace. How can I do it? And It would me fine for me to exclude all images in my sitemap. How to exclude them? Thank you!

Martynov Maxim (talkcontribs)

Hi. Add this item to you LocalSettings.php:

$wgAutoSitemap["exclude_namespaces"][] = NS_PROJECT;

Fokebox (talkcontribs)

Thank you! Now I excluded all images and project pages. And the final question how to exclude the topics like this one from the list of xml sitemap?

Martynov Maxim (talkcontribs)

You can find at extension page setting "exclude_pages"which excludes certain pages from sitemap.

Fokebox (talkcontribs)

Hi all and thanks for replies. I have set the extension as I wanted!

how to force to generate sitemap.xml ?

3
Alexandroslee (talkcontribs)

how to force to generate sitemap.xml immediately?

Martynov Maxim (talkcontribs)

Save something at any page, create new or delete.

2001:B011:4007:1A63:844C:5F26:D909:4B10 (talkcontribs)

got it! Thanks

Fokebox (talkcontribs)

Hello dear developers, I have found some bugs of the extension, to be correct - there are two other extension that incompatible with following extension that do not function correctly:

  • MSUpload - Multiple upload of the files
  • Flow - Creates topics at Discussion pages

So when I upload files the extension shows some error addressing to autositemap extension. Topic doesn't appear immediately (ass it should be) when I add it at discussion page with Flow. It appears just after refreshing the page. As I switch off the Autositemap extension all works fine. Would be nice if you fix this problem!

Reply to "Bugs of the extension"
There are no older topics