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.
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.
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
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}
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.
When I try
php maintenance/eval.php
> var_dump(NS_WIDGET);
I get
int(274)
Add something like var_dump(NS_WIDGET);
into LocalSettings.php before passing this namespace into an extension, and give an output here.