Last modified: 2011-04-30 01:16:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T20270, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18270 - Some IIS-based configuration doesn't serve 404 errors from PHP correctly
Some IIS-based configuration doesn't serve 404 errors from PHP correctly
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
1.14.x
PC Windows Server 2003
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
http://wiki.ourfamilyzoo.net
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-31 05:44 UTC by Shawn Desjardins
Modified: 2011-04-30 01:16 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Shawn Desjardins 2009-03-31 05:44:14 UTC
Hello,
Perhaps I am overlooking something really simple.
1>
The links at the top for the user page, user talk are red links, that's normal, they have not been created yet. But they do not contain the "&action=edit&redlink=1" at the end in order to create the page.
When I click, I simply get a default web 404 error page. It should get me to at least a "create this page" type of page.
2>
This is probably something I have not configured yet, but any entry of the order of "user:xxxx" or "desjardins:xxxx" etc..  typed into the text box in the left menu or when I link to the blue "about:desjardins" link etc.. they also come up as a 404 errors. 
I should be at least pointed to a "create this page" type of page also.

Please let me know what I am over looking or if I am actually crazy! :>

Thanks
Comment 1 Niklas Laxström 2009-03-31 14:57:33 UTC
Some problem with IIS; looks like it sends it's own 404 pages overriding MediaWiki's.
Comment 2 Shawn Desjardins 2009-03-31 20:28:20 UTC
The problem is that the correct links are not being created by the wiki software. It is making the links red, because the pages do not exist, but not appending the "&action=edit&redlink=1" at the end of the link and therefore the page is not found, which is correct. HOW DO I GO ABOUT CORRECTING THE LINK CREATION.
Comment 3 Shawn Desjardins 2009-04-02 02:45:22 UTC
(In reply to comment #1)
> Some problem with IIS; looks like it sends it's own 404 pages overriding
> MediaWiki's.
> 

The problem is that the correct links are not being created by the wiki
software. It is making the links red, because the pages do not exist, but not
appending the "&action=edit&redlink=1" at the end of the link and therefore the
page is not found, which is correct. HOW DO I GO ABOUT CORRECTING THE LINK
CREATION.
Comment 4 Shawn Desjardins 2009-04-06 22:16:53 UTC
I am still having the same problem and have not found a solution to this. Thank you.
Comment 5 Niklas Laxström 2009-04-07 06:07:37 UTC
Fix your IIS so that it does not override MediaWiki's 404 error pages with it's own. As far as I can see this is a configuration error of the server and has nothing to do with MediaWiki. Please provide more details if this is not the case.
Comment 6 Shawn Desjardins 2009-04-07 17:59:16 UTC
Okay, There seems to be a communication issue(In reply to comment #5)
> Fix your IIS so that it does not override MediaWiki's 404 error pages with it's
> own. As far as I can see this is a configuration error of the server and has
> nothing to do with MediaWiki. Please provide more details if this is not the
> case.
> 
There is nothing wrong with the IIS, The wiki software is not creating the correct redlinks for user pages and user talks, for example if you create a new page the talk page is a red link and at the end of the hyperlink wiki software appends "&action=edit&redlink=1" so that the page is created. At the top of the page where the user page link is, and the user talk page link is that is not appended. Where do I fix that. 

Comment 7 Shawn Desjardins 2009-04-07 18:07:32 UTC
FYI, mediawiki 1.14.0 did not contain any 404 error pages. 
Comment 8 Platonides 2009-04-07 18:11:09 UTC
They point to 'view the page' instead of 'edit the page', granted, but that shouldn't show the 'default web 404 error page'.
Which skin are you using? What happens if you browse to a random page title?
Is it IIS 404 oage or Internet Explorer?

Is it on a public site where it can be viewed?
Comment 9 Shawn Desjardins 2009-04-08 21:49:31 UTC
Hi There,
I have tried it with all the skins.
random page seems to work fine. it's just the "User"links, and any wiki type pages that haven't been created when searching.
you can always go to wiki.ourfamilyzoo.net

(create a user account if you want, the page gives an error about the e-mail, I haven't figured that yet, but it works?)

S.
Comment 10 Platonides 2009-04-12 22:05:41 UTC
No, the problem is with IIS configuration, overriding the 404 page.

You can use this testcase:
<?php
header("HTTP/1.x 404 Not Found");
echo 'Nothing here, go to the <a href="/">main page</a>';
?>

The above php should show the text "Nothing here, go to the main page", but with your configuration, it'll show the default IIS 404 error.


As a woraround, you can remove from Article.php the lines 841-843:
            if( $return404 ) {
                $wgRequest->response()->header( "HTTP/1.x 404 Not Found" );
            }

but it is NOT recommended.
The server config should be fixed instead.
Comment 11 Shawn Desjardins 2009-04-15 04:06:33 UTC
(In reply to comment #10)
> No, the problem is with IIS configuration, overriding the 404 page.
> 
> You can use this testcase:
> <?php
> header("HTTP/1.x 404 Not Found");
> echo 'Nothing here, go to the <a href="/">main page</a>';
> ?>
> 
> The above php should show the text "Nothing here, go to the main page", but
> with your configuration, it'll show the default IIS 404 error.
> 
> 
> As a woraround, you can remove from Article.php the lines 841-843:
>             if( $return404 ) {
>                 $wgRequest->response()->header( "HTTP/1.x 404 Not Found" );
>             }
> 
> but it is NOT recommended.
> The server config should be fixed instead.
> 

I don't see what you are talking about. The red links to for example to a regular article have the links correct, but the red links to ones own talk page or user page are not correct. How do I fix the link creation for these links? I do not see how that has anything to do with what 404 error I am receiving.
Comment 12 Platonides 2009-04-15 17:59:46 UTC
(In reply to comment #11)
> I don't see what you are talking about. The red links to for example to a
> regular article have the links correct, but the red links to ones own talk page
> or user page are not correct. How do I fix the link creation for these links? I
> do not see how that has anything to do with what 404 error I am receiving.

Go to a non-existent page on any other wiki, eg. http://test.wikipedia.org/wiki/FooBar
You get a wiki page saying that it's empty, and offering to create it.

Now, try to do it on your wiki. You get an IIS message error. That's what you need to 
solve. IIS is seeing that mediawiki gives a 404 (per bug 2585) and shows its own page 
instead of the one mediawiki provides.
Comment 13 Brion Vibber 2009-04-15 21:52:12 UTC
Updated summary to describe the issue.

Note that the example URL currently displays a MySQL connection error, so we can't test the wiki's behavior on that server.
Comment 14 Shawn Desjardins 2009-04-20 16:43:42 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > I don't see what you are talking about. The red links to for example to a
> > regular article have the links correct, but the red links to ones own talk page
> > or user page are not correct. How do I fix the link creation for these links? I
> > do not see how that has anything to do with what 404 error I am receiving.
> 
> Go to a non-existent page on any other wiki, eg.
> http://test.wikipedia.org/wiki/FooBar
> You get a wiki page saying that it's empty, and offering to create it.
> 
> Now, try to do it on your wiki. You get an IIS message error. That's what you
> need to 
> solve. IIS is seeing that mediawiki gives a 404 (per bug 2585) and shows its
> own page 
> instead of the one mediawiki provides.
> 

I do not see any error pages provided by the mediawiki software, If you could point me to what page the 404 is supposed to point to than I am happy to do so. I came here for help, cause I obviously had an issue. I followed (probably should not have) the instructions for installing mediawiki software, and this is where I am at now.
Comment 15 Shawn Desjardins 2009-04-21 02:58:00 UTC
Okay just to make sure that I did everything right according to your instructions I did another clean install with a once again fresh download of the wiki software, and I am still having the same issue with a generic 404 page coming up. It happens when:

I click on the links to a user page that does not exist.
I click on the links to a users talk page that does not exist. (When I click on a talk page to an article that does not yet have a talk page of it's own, it goes directly to the editing this page function through the &redlink=1 that is already in the hyper link)
I click on a link for a "special page" ( like help:xxxx or desjardins:xxxx) that does not exist.
I type in the search box anything with a colon (user:someone, or help:something) that a page does not exist and then clock on "GO" or press the Enter key. (But I get the correct Wiki the page does not exist etc... page when I press "search".)

So that tells me something is missing in the error checking of the wiki software to properly handle non existant pages and therefore gives up and IIS has nothing better to do than return a 404 page. 

I do have programming knowledge but I am not an expert php programmer, I am not an expert webmaster, I simply followed the instructions provided and this is what I am encountering. I do not recall anywhere telling me where I needed to set up how to handle 404 errors, or non-existent pages, or that I had to set up IIS any diferently to handle 404 errors other than what was there already.
Comment 16 Niklas Laxström 2009-04-21 08:30:50 UTC
If you want anything useful out of this bug: Figure out why IIS is doing it. Is it the default behaviour? Which versions are affected? How to configure it off if possible?

FYI: bug 17042 is about fixing the few specific problems you mentioned, but not about IIS doing bad things. You can test how it is supposed to work in any other wiki, like en.wikipedia.org.
Comment 17 Roan Kattouw 2009-04-21 09:36:34 UTC
(In reply to comment #15)
> So that tells me something is missing in the error checking of the wiki
> software to properly handle non existant pages and therefore gives up and IIS
> has nothing better to do than return a 404 page. 
> 
No, that's incorrect. The wiki returns the page you're expecting with a 404 error code, and IIS detects the 404 code and wrongfully decides to serve its own error page instead, overriding MediaWiki's. Try the testcase from comment #10 to confirm this.
Comment 18 Johnny Miller 2009-04-21 17:30:16 UTC
I'm having this same problem so if anyone knows the exact steps to fix it would be much appreciated.
Comment 19 Johnny Miller 2009-04-21 17:35:39 UTC
I think I found a fix!!
Try this and let me know if it works for you.

Got to IIS Manager.
Open Web Sites.
Right lick on the website and select Properties.
Go to the Custom Errors tab.
Scroll down to the 404 error, select it and click the "Set to Default" button.

Comment 20 Johnny Miller 2009-04-21 17:37:29 UTC
Make that a "right CLICK".  Licking might not help.
Comment 21 Roan Kattouw 2009-04-21 20:35:48 UTC
Closing as INVALID, as this is clearly an IIS config issue, not a bug in MediaWiki, and because a fix is mentioned in comment #19.
Comment 22 Shawn Desjardins 2009-04-21 21:37:46 UTC
(In reply to comment #19)
> I think I found a fix!!
> Try this and let me know if it works for you.
> 
> Got to IIS Manager.
> Open Web Sites.
> Right lick on the website and select Properties.
> Go to the Custom Errors tab.
> Scroll down to the 404 error, select it and click the "Set to Default" button.
> 

Thank you, This seems to work. Not exactly as I would like, but it works.
The IIS setup was already set to default (As it was a brand new website added into IIS), but somehow when I did this it must have re-initialized and now it works.
Thank you.
Comment 23 Thiesen 2009-07-16 07:12:25 UTC
The fix mentioned in #19 above is not quite accurate for IIS 7.0. Here is the workaround I found.

Open inetmgr. Expand Sites and expand your website. Select the folder for your wiki in the tree (/wiki in my case). Double click the Error Pages icon. Right click in the list and select Edit Feature Settings. Select "Detailed errors". Click OK.
Comment 24 azeeznm 2009-08-23 08:59:44 UTC
i have same problem. this is my url www.ponkavanam.com. i installed mediawiki 13 to my godaddy host. it is running long year perfectly . but recently i try to upgraded mediawiki 15. it ok .but problem that when i click a non exiting page in sidebar it is going to page not found page. that why downgrade same as old. after that it is working very well . i don't know actually what is the problem. 

today i installed mediawiki 15 in subdomain folder. see this urlhttp://islahicenter.ponkavanam.com  

still exist the same problem.
any one know to resolve the problem?
Comment 25 Platonides 2009-08-23 13:07:10 UTC
It's not a mediawiki bug. You have IIS misconfigured.
Comment #19 explains how to fix it. In your case, you may need to contact your hosting to fix it.
Comment 26 azeeznm 2009-08-24 08:08:44 UTC
how the mediawiki 13 working 
eg: www.ponkavanam.com and
mediawiki 15 not working????
eg: http://islahicenter.ponkavanam.com
Comment 27 Platonides 2009-08-24 12:35:48 UTC
MediaWiki 1.13 flags non-existing pages with code 200, which mean that the page exists and is found. MediaWiki 1.15 gives a 404 HTTP code and gives the same page as before, *which IIS is ignoring*.
Comment 28 azeeznm 2009-08-26 12:44:59 UTC
1.Protected Red link not working  eg:  http://islahicenter.ponkavanam.com/jiic/index.php?title=User:WikiSysop&action=edit&redlink=1
: if i have right to edit it will work.
2.unprotected Red link working  eg:  http://islahicenter.ponkavanam.com/jiic/index.php?title=Talk:WikiSysop&action=edit&redlink=1
3.unprotected Red link not working without "&action=edit&redlink=1" eg:  http://islahicenter.ponkavanam.com/jiic/index.php?title=Talk:WikiSysop


Comment 29 Platonides 2009-08-26 21:07:57 UTC
*You have IIS misconfigured*
Don't ask us to configure your server.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links