Steps to replicate the issue (include links if applicable):
If you setup your wiki to run directly under the URL e.q. https://wiki.company.net/ then the reply and subscribe buttons are not shown on discussion Pages.
If you change the wiki to run under a sub folder e.g. https://wiki.company.net/wiki/, then it works
$wgArticlePath = "/$1"; # doesn't work $wgArticlePath = "/wiki/$1"; # works
Reason
I found out that the problem results from an wrong regex built within CommentUtils::getTitleFromUrl().
If you run the wiki with subFolder e.g. /wiki/, then the value of $articlePathRegexp is "/\/wiki\/([^?]*)/"
The value from $config->get( 'ArticlePath' ) is https://local/wiki/User_talk:Tom_Ramm
So the result from this function will be: User_talk:Tom_Ramm
But if you change the LocalSettings.php to $wgArticlePath = "/$1";, then the value of $articlePathRegexp is "/\/([^?]*)/ "
The value from $config->get( 'ArticlePath' ) is https://local/User_talk:Tom_Ramm
So the result from this function will be: /local/User_talk:Tom_Ramm
the starting /local/ in the result is the problem.
Solution
my solution is to change the code (starting from line 488) to:
$articlePath = $config->get( 'ArticlePath' ); if ($articlePath === "/$1") { $articlePath = "/local/$1"; } $articlePathRegexp = '/' . str_replace( preg_quote( '$1', '/' ), '([^?]*)', preg_quote( $articlePath, '/' ) ) . '/';
Software version
MW 1.40.0
Discussion tools 0.0.0 (as showing in Special:Version) / REL_140