Last modified: 2013-04-25 17:36:43 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 T28720, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26720 - 'Name of wiki' field accepts 'MediaWiki' and '#' as the inputs
'Name of wiki' field accepts 'MediaWiki' and '#' as the inputs
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.18.x
PC Windows XP
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: easy
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-14 05:21 UTC by Nadeesha
Modified: 2013-04-25 17:36 UTC (History)
4 users (show)

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


Attachments
Mediawiki as input to the Name of wiki (128.09 KB, image/jpeg)
2011-01-14 05:21 UTC, Nadeesha
Details
# as the input to the 'Name of wiki' field (128.00 KB, image/jpeg)
2011-01-14 05:22 UTC, Nadeesha
Details

Description Nadeesha 2011-01-14 05:21:53 UTC
Created attachment 7991 [details]
Mediawiki as  input  to the Name of wiki

Steps to reproduce:
1. Complete the installation upto the 'Database settings' page.
2. Input 'MediaWiki' or '#' as the 'name of wiki'.
3. Click on the 'Continue' button.

Actual result:
System accepts the inputs('MediaWiki' and '#) and does not display 'Enter a site name.' message.

Note : MediaWiki 1.16.1 version does not accepts the 'MediaWiki' and '# as the inputs for 'Name of wiki' field.

Expected result:
System should display 'Enter a site name.' message.
Comment 1 Nadeesha 2011-01-14 05:22:51 UTC
Created attachment 7992 [details]
# as the input to the 'Name of wiki' field
Comment 2 Chad H. 2011-01-17 16:15:09 UTC
MediaWiki is a valid site name, however it is not a valid namespace name. This is a known issue and needs (some sort) of resolving. See comments New-installer_issues#.24wgSitename_forgotten.3F

# is not a valid site name and we should show an error.
Comment 3 Chad H. 2011-01-17 16:15:48 UTC
(In reply to comment #2)
> See comments
> New-installer_issues#.24wgSitename_forgotten.3F
> 

See comments http://www.mediawiki.org/wiki/New-installer_issues#.24wgSitename_forgotten.3F

I chopped part of the URL
Comment 4 Chad H. 2011-02-28 23:20:07 UTC
Fixed namespace conflicting in r82980.

Still need to fix # as sitename.
Comment 5 Sumana Harihareswara 2013-02-22 02:24:15 UTC
Is this still reproducible? Am boldly marking this as easy - please remove the keyword if this is not a suitable thing for a new MediaWiki developer (who already knows PHP) to try to fix.
Comment 6 Dylan Lexie 2013-03-24 19:16:59 UTC
What are we actually talking about validating for?
I'm new to MediaWiki development and I was going to start on fixing this, but I'm not clear as to the issue at hand. The steps described ('#' case) no longer pass validation because the generated empty-string namespace gets rejected, but whether this means the bug was fixed in passing is not clear to me because I'm not sure what the actual bug is/was. Part of my confusion is also that I find the notion that '#' would be a uniquely problematic name suspect--Shouldn't it be something more like names beginning with '#'? But unless the site name gets used in db table names, I couldn't find any usage of # that seemed like it would make this a problem either way.

If it's not worth the trouble clarifying this for a newbie, no problem, but I think in that case the 'easy' keyword might be better removed.
Comment 7 Gerrit Notification Bot 2013-04-14 07:02:55 UTC
Related URL: https://gerrit.wikimedia.org/r/59067 (Gerrit Change If64138034e6bf874d66b76a49e8bf42d617033f4)
Comment 8 ganeshaditya1 2013-04-14 07:09:22 UTC
Fixed the bug please review it Change id:
If64138034e6bf874d66b76a49e8bf42d617033f4
Comment 9 ganeshaditya1 2013-04-16 13:55:36 UTC
https://gerrit.wikimedia.org/r/#/c/59390/
I am very sorry I messed up with my previous upload. I finally figured out git :) My slow internet truely hindered my learning :)
Comment 10 Chad H. 2013-04-16 14:07:22 UTC
(In reply to comment #6)
> What are we actually talking about validating for?
> I'm new to MediaWiki development and I was going to start on fixing this, but
> I'm not clear as to the issue at hand. The steps described ('#' case) no
> longer
> pass validation because the generated empty-string namespace gets rejected,
> but
> whether this means the bug was fixed in passing is not clear to me because
> I'm
> not sure what the actual bug is/was. Part of my confusion is also that I find
> the notion that '#' would be a uniquely problematic name suspect--Shouldn't
> it
> be something more like names beginning with '#'? But unless the site name
> gets
> used in db table names, I couldn't find any usage of # that seemed like it
> would make this a problem either way.
> 
> If it's not worth the trouble clarifying this for a newbie, no problem, but I
> think in that case the 'easy' keyword might be better removed.

I think the original main problem (of conflicting namespace names) was the worse problem, which I fixed a long time ago.

I really don't think anything else needs fixing here at all.
Comment 11 ganeshaditya1 2013-04-16 14:19:13 UTC
What about # as the media wiki name ?
I am making change to this cause I just got an email that says that MediaWiki is an acceptable name for the site
Comment 12 Chad H. 2013-04-16 14:23:28 UTC
Well that could possibly be fixed, but if so it should check for any invalid namespace characters, not just #.
Comment 13 ganeshaditya1 2013-04-16 14:33:46 UTC
What are invalid namespace characters ? I will place them in an array and compare them and when I find a match I will throw an error.  I will push that as an amendment to this
Comment 14 Dylan Lexie 2013-04-21 22:30:32 UTC
The namespace is used as a component in page titles, so the restrictions that apply to the namespace name should be the same as the restrictions that apply to a page name. This is actually already in place (see lines 737+ of WebInstallerPage.php), which means I think we can safely conclude that there's no further development to be done with regards to this report.
Comment 15 ganeshaditya1 2013-04-22 02:57:01 UTC
(In reply to comment #14)
> The namespace is used as a component in page titles, so the restrictions that
> apply to the namespace name should be the same as the restrictions that apply
> to a page name. This is actually already in place (see lines 737+ of
> WebInstallerPage.php), which means I think we can safely conclude that
> there's
> no further development to be done with regards to this report.

It is not necessary that the site name should be the same as the namespace name right ? I can still name my site as # and name my project namespace as MyWiki, by choosing the third option in the installer(The one that says choose a separate namespace name). However if I choose to use the project namespace as same as the sitename, all the restrictions that are forced on the namespace start to apply on the sitename as well. Also these restrictions on namespaces tend to replace any violation with a empty string and do not provide the user with clarity regarding why there sitename is being rejected. But am not sure if all the namespace restrictions SHOULD apply to the sitename as well or not. I have written a mail to chad regarding the same and am awaiting his reply on this.
Comment 16 Chad H. 2013-04-23 15:01:51 UTC
Please don't send private e-mails, keep discussion on the bug...

The validation isn't actually performed on the sitename as far as I can see, only on the namespace (it fetches the initial namespace from the sitename, which might be the source of your confusion).

And no, not all the namespace validation applies to wgSiteName.

I really don't see a bug anymore...
Comment 17 Chad H. 2013-04-25 17:36:43 UTC
I'm going to mark this as fixed. The sitename can be almost anything, and it doesn't matter if it's the same as the meta namespace name or not (it can be, but doesn't have to be, and isn't when you use MediaWiki as the sitename). There's plenty of workarounds (able to specify your own meta namespace), and we don't allow namespaces that don't pass validation.

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


Navigation
Links