Page MenuHomePhabricator

Discussion creation returns 404 when DiscussionTools installed
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue

What happens?:

A 404 is returned, error message "Not Found The requested URL was not found on this server."

What should have happened instead?:

The user should be directed to a "Creating Talk:<Page>" dialogue.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

1.41.x, 1.42.1, 1.43.0-beta

Other information (browser name/version, screenshots, etc.):

Removing redlink=1 from the end of the not-yet-created Discussion URL (e.g. https://pommel.uber.space/index.php?title=Talk:Wiki_issues&action=edit&redlink=1 ) returns the expected Discussion creation dialogue, not a 404.

Event Timeline

It's not with DiscussionTools. You have this problem on every page. If you think it is caused by DiscussionTools, disable it again and compare.

Try to disable https://www.mediawiki.org/wiki/Manual:$wgSend404Code

@Wargo Yes, this problem presents on every Page where the Discussion does not yet exist. Disabling DiscussionTools does resolve the issue: I only noticed the issue after installing DiscussionTools. The testing instance I linked has minimal customization/configuration, only:

# End of automatically generated settings.
# Add more configuration options below.

wfLoadSkin( 'Vector' );
wfLoadExtension( 'VisualEditor' );
wfLoadExtension( 'Linter' );
wfLoadExtension( 'DiscussionTools' );

Adding $wgSend404Code = false as you suggested does also resolve the issue, while preserving DiscussionTools! Can I consider this an acceptable workaround, or does it have bad side effects?

The workaround suggest this is problem with server config but weird that it is only when DT enabled.

Helpful for debugging (for developers):
https://gerrit.wikimedia.org/g/mediawiki/core/+/master/includes/page/Article.php#1611 to 1622, hook used by DT
and function shouldDisplayEmptyState

The config manual says that edit views never get 404s, only read views – and DiscussionTools turns &action=edit&redlink=1 URLs from edit views to read views, likely triggering the configuration error of your web server software. If my analysis is correct, https://pommel.uber.space/index.php?title=Talk:Wiki_issues should display the unfriendly 404 page regardless of whether DiscussionTools is enabled as long as $wgSend404Code true.

If my analysis is correct, https://pommel.uber.space/index.php?title=Talk:Wiki_issues should display the unfriendly 404 page regardless of whether DiscussionTools is enabled as long as $wgSend404Code true.

Yes, and non-discussion pages (as I remember) too. Currently he set this to false.

Okay, then the extension works as expected, and problem lies either in your web server or in its configuration. You should contact your hosting provider (if you have one), or ask at https://www.mediawiki.org/wiki/Project:Support_desk with more details about your setup (used web server, configuration files etc.).

Thank you for your swift responses. Installation on our production server (quite a different environment) was issue free https://wiki.kanthaus.online/Wiki_tasks I will contact the provider https://uberspace.de/en/ and update the guide I wrote for their service https://lab.uberspace.de/guide_mediawiki/