Last modified: 2005-02-07 10:37:30 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 T2626, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 626 - Different new page text for each namespace (enhancement)
Different new page text for each namespace (enhancement)
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch
: 627 629 948 1350 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-03 00:24 UTC by Christopher Beland
Modified: 2005-02-07 10:37 UTC (History)
3 users (show)

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


Attachments
Patch for bug (4.96 KB, patch)
2004-11-27 23:55 UTC, Josh Cogliati
Details
version 2 of patch (4.96 KB, patch)
2004-12-02 03:28 UTC, Josh Cogliati
Details
adds namespace conditionals (1.98 KB, patch)
2005-02-02 03:52 UTC, Josh Cogliati
Details
adds in namespace conditional (2.26 KB, patch)
2005-02-03 02:47 UTC, Josh Cogliati
Details

Description Christopher Beland 2004-10-03 00:24:44 UTC
In Wikipedia, upon loading Category:Foo, which has no content and no articles or
subcategories, this error message is given:

 Wikipedia does not yet have an article with this name.

A better error message would be "Wikipedia does not yet have a category
with this name."

The following advice is given:

 * To start the article, click [edit this page].
 * Perhaps there is an entry Foo in our sister dictionary project, Wiktionary.
 * If you created an article under this title previously, it may have been
deleted. See candidates for speedy deletion for possible reasons.

A better message might be:

 * To add articles or subcategories to this category, you need to edit the page
you want to add, and add the text <nowiki>[[Category:Foo]]</nowiki> near the
bottom of the page, above the interwiki links.  Please check that a more
appropriate category does not already exist before doing so.
 * [Click here] to search for an article with the same name.
Comment 1 Brion Vibber 2004-10-03 00:30:44 UTC
*** Bug 627 has been marked as a duplicate of this bug. ***
Comment 2 Brion Vibber 2004-10-03 00:31:24 UTC
*** Bug 629 has been marked as a duplicate of this bug. ***
Comment 3 Christopher Beland 2004-10-03 00:35:09 UTC
Bugs 627 and 629 are not duplicates; they suggest different text for different
cases. -B.
Comment 4 Brion Vibber 2004-10-03 00:39:07 UTC
There's only one issue at hand, please keep it in one place.
Comment 5 Christopher Beland 2004-10-03 07:29:38 UTC
Okay, here are the other cases that I propose handling:

** Text for new talk pages is inappropriate **

In Wikipedia, when displaying a non-existant talk page Talk:Foo, the following
error message is shown:

 Wikipedia does not yet have a page called Foo.

 * To start the article, type in the box below and click "Save page". Your
changes will be visible immediately.
 * Please do not create an article to promote yourself, a website, a product, or
a business (see Wikipedia:Policy).
 * If you are new to Wikipedia, please read the tutorial before creating your
first article.
 * If you create a test page, you will not be able to delete this yourself, so
please only use the sandbox for experiments.

A better message would be:

Wikipedia does not yet have a talk page for Foo.

 * To start the discussion, type in the box below and click "Save page".
 * This page is only for discussion about the page Foo.

The same goes for Category talk, Wikipedia talk, etc.


** Inappropriate result for categories that have children but no contents **

In Wikipedia, when displaying a Category:Foo that has articles or subcategories,
but no contents, the following error is displayed:

Wikipedia does not yet have a page called Foo.

 * To start the article, type in the box below and click "Save page". Your
changes will be visible immediately.
 * Please do not create an article to promote yourself, a website, a product, or
a business (see Wikipedia:Policy).
 * If you are new to Wikipedia, please read the tutorial before creating your
first article.
 * If you create a test page, you will not be able to delete this yourself, so
please only use the sandbox for experiments.

This is followed by the list of member subcategories, the list of member
articles, and an edit box.

A better result might be:

 * This category is an [[:Category:Orphaned categories|orphan]]. [Click here] to
de-orphan or add a note to it.  It will display as a "red link" until someone
does this.
 * To add articles or subcategories to this category, you need to edit the page
you want to add, and add the text <nowiki>[[Category:Foo]]</nowiki> near the
bottom of the page, above the interwiki links.  Please check that a more
appropriate category does not already exist before doing so.

...followed by the list of member subcategories and articles (no cumbersome edit
box).

Comment 6 Rowan Collins [IMSoP] 2004-11-27 22:43:58 UTC
*** Bug 948 has been marked as a duplicate of this bug. ***
Comment 7 Rowan Collins [IMSoP] 2004-11-27 22:47:36 UTC
Bug 948 suggested that there should be a different message for all 'talk'
namespaces [see that bug for a patch that implements this], whereas this one
suggests having one per namespace; I think ideally we need *both*.

I definitely agree that it would be useful if there could be a different message
for different namespaces, given that there's no way of creating "if clauses"
within one message. I've always thought suggesting people search for a term, or
look on a sister project, seems a bit bizarre for a "discussion" page; or, for
that matter, a "Project" page, a category, etc.

What would be really nice would be the ability to say, for instance "This
category currently has no description; for hints on what should go here, see
[[Help:Category]]" - since a category "exists", in one sense, if it has pages in
it, but may still have no description. Similarly, a new "Help:" page could have
links to an explanation of that namespace. Whereas all talk namespaces need the
same instructions on what discussion pages are and aren't for.

In other words, I think we need one of these messages per ["normal"] namespace
(so appropriate instructions and hints can be given), and then one for all
discussions (i.e. shared by all "_talk" namespaces). That doesn't mean they all
*have* to be different on any given installation, of course, it just means they
*can* be.
Comment 8 Josh Cogliati 2004-11-27 23:55:32 UTC
Created attachment 136 [details]
Patch for bug

Added a new patch for the bug.	This combines the fix for bug 948 (a separete
new talk page text) and also has seperate message for each non-talk namespace. 
I didn't think very hard about the messages, so someone probably should improve
them before commiting this patch (if you post them to this bug I will gladdly
incorporate them and create a new patch).

So this adds 8 new page texts (which need to be written):
newuserpagetext,
newwikipediapagetext,
newimagepagetext,
newmediawikitext,
newtemplatetext,
newhelppagetext,
newcategorytext,
newtalktext
Comment 9 Christopher Beland 2004-11-30 06:21:31 UTC
For category pages, I would recommend something like the following generic message:

(This category has no description. See the [[{ns:4}}:Help|help page]] for more
information.)

To say that a category doesn't "exist" when it may have articles or
subcategories is somewhat confusing. 

For talk pages, instead of "To comment on the article, start typing..." I would
recommend something like "To comment on the page *name of article page here*,
start typing..."  There's no generic phrase like "article" I could think of that
both encompasses all of the various namespaces and is clear about what is being
commented on (important for newcomers).
Comment 10 Rowan Collins [IMSoP] 2004-11-30 18:21:03 UTC
(In reply to comment #9)
> For talk pages, instead of "To comment on the article, start typing..." I would
> recommend something like "To comment on the page *name of article page here*,
> start typing..." 

Once again, we hit an awkward namespace problem, which is basically what bug 531
is about - there's no variable for "the page for which this is the discussion".
On Wikipedia_talk:Foo, you don't want the message to say "...to discuss the page
'Foo'..." (result of {{PAGENAME}}), but nor do you want it to say "...to discuss
the page 'Wikipedia_talk:Foo'..." (result of {{NAMESPACE}}:{{PAGENAME}}).

On a different note, perhaps it would be good to refer to specific Help: pages
in each message (e.g. [[Help:Category]], [[Help:Discussion page]], etc). This
has the disadvantage that it doesn't work on fresh installs (you'll get
redlinks), but hopefully this will be changed soon, and the whole Help:
namespace will be available straight away.
Comment 11 Josh Cogliati 2004-12-02 03:28:08 UTC
Created attachment 140 [details]
version 2 of patch

Changes catagory text to suggested.  Also changes talk page text to say page
{{PAGENAME}} instead of article.
Comment 12 Josh Cogliati 2004-12-03 02:40:42 UTC
I am requesting comments on the texts on <a
href="http://en.wikipedia.org/wiki/MediaWiki_talk:Newarticletext#New_Texts_for_Patch_626_Different_new_page_text_for_each_namespace">MediaWiki
talk:Newarticletext</a>.
Comment 13 Josh Cogliati 2004-12-14 04:13:25 UTC
Okay, there have been no comments on this bug for over a week (on this page and
the wiki).  Should it be added to CVS now, or are there any new comments?
Comment 14 Brion Vibber 2004-12-14 05:17:32 UTC
I still consider it a non-issue and lean strongly towards resolving as WONTFIX.
Comment 15 Rowan Collins [IMSoP] 2004-12-14 10:48:38 UTC
(In reply to comment #14)
> I still consider it a non-issue and lean strongly towards resolving as WONTFIX.
 
But surely you can see that having a message when someone clicks "discussion"
telling them to "search for articles" is at the very least confusing. Obviously,
that's not in itself a software issue (it's up to the admins what goes in the
message) but the software currently offers no way of suggesting a search for an
article that doesn't exist (helpful) without also suggesting it for a discussion
which hasn't been started yet (unhelpful). Having seperately configurable
messages allows this distinction, as well as others (such as "this category
contains no description"); the patch is there, so where's the harm?
Comment 16 Josh Cogliati 2004-12-15 02:33:51 UTC
(In reply to comment #14)
> I still consider it a non-issue and lean strongly towards resolving as WONTFIX.
> 

Take a look at the English wikipedia text:
Wikipedia does not yet have a MediaWiki page called Newarticletext.

    * To start the page, begin typing in the box below. When you're done, press
the "Save page" button. Your changes will be visible immediately.
    * If this is an article page (as opposed to e.g. a discussion page):
          o Please do not create an article to promote yourself, a website, a
product, or a business (see Wikipedia:Policy).
          o If you are new to Wikipedia, please read the tutorial before
creating your first article, and only use the sandbox for editing experiments.
          o Search for Newarticletext in Wikipedia

Notice the If that is there?  The software can do that check very easily.  A
human actually has to read it, understand it, and then determine if it is
relevent.  Then, and only then does the human know if they have to read the
whole goob of text or not.  If this patch was in wikipedia, then the software
could do the check, and then the text could be shorter since it doesn't have to
discuss all the cases that it could be.  

Starting a new page has different sematic meaning depending on which namespace
you are in.  Shouldn't the new page text be different if the underlying meaning
of starting a new page is different?
Comment 17 Josh Cogliati 2005-01-16 23:22:10 UTC
I sent a request for comments to the wikitech mailing list:
http://mail.wikipedia.org/pipermail/wikitech-l/2005-January/thread.html#27138
Comment 18 Rowan Collins [IMSoP] 2005-01-17 16:33:29 UTC
*** Bug 1350 has been marked as a duplicate of this bug. ***
Comment 19 Josh Cogliati 2005-02-02 03:52:39 UTC
Created attachment 243 [details]
adds namespace conditionals

This is a new idea for solving the problem.  Instead of adding new system
messages, it adds a new magic variable that does conditional inclusion of text
depending on the namespace.  The new variable is IN_NS, and the syntax is
{{IN_NS:namespace|text}} For example, if the following is in a template:

{{IN_NS:Talk|This is in talk}}
then this will add no text if it ends up in a non-talk article, but if it is in
a talk page, then it will output "This is in talk".  This way, text can be
added that will only appear in the appropriate namespace.  This allows the
different new page text by allowing conditional inclusion of the approriate
text for each namespace.

The patch is fairly simple, but I have not tested it extensively yet (it still
needs non-english testing among other things).
Comment 20 Josh Cogliati 2005-02-03 02:47:58 UTC
Created attachment 247 [details]
adds in namespace conditional

This new version of the patch now checks to make sure that when intval returns
0, it really is zero, so if it is not, it will be noticed as an error.	Other
than than, this patch is the same as before.  

Tested with the following as a possible new wikipedia newarticletext:
'''Wikipedia does not yet have a {{NAMESPACE}} page called {{PAGENAME}}.'''
* To start the page, begin typing in the box below. When you're done, press the
"Save page" button. Your changes should be visible immediately.
* '''If you have created this page in the past few minutes and it has not yet
appeared, it may not be visible due to a delay in updating the database.'''
Please wait and check again later before attempting to recreate the page.
{{IN_NS:|
* Please do not create an article to promote yourself, a website, a product, or
a business (see [[Wikipedia:Policy]]).
* If you are new to Wikipedia, please read the [[Wikipedia:Tutorial|tutorial]]
before creating [[Wikipedia:Your first article|your first article]], and only
use the [[Wikipedia:Sandbox|sandbox]] for editing experiments.
* [[Special:Search/{{PAGENAME}}|Search for {{PAGENAME}} in Wikipedia]]
}}

which worked as expected (The argument to IN_NS only appeared in the main
namespace when a new article was being created.

Another test I tried was the following:
{{IN_NS:Talk|We are in talk}}{{IN_NS:|We are in main}}

Someone should probably test this on a non-english wikipedia, as I don't have
one.  

I believe that this version is ready to go into cvs, and I would like further
comments if anyone thinks it needs work.  I would recommend this patch as
opposed to newpages2 patch, since this one is shorter and more powerful.
Comment 21 Josh Cogliati 2005-02-06 18:32:57 UTC
I chatted with Brion on this bug (Brion, feel free to clarify if I am
misrepresenting what you said).  

He stated that the reason that the first implementation will not go in is that
in requires translating multiple version of the message.  

The reason that the second implementation will not go in (at least not without
more thought/discussion) is that it is a step towards turning the wikimedia
language into a macro language (which is not a desired end).

Then, he suggested doing something like: {{new{{NAMESPACE}}text}}.  This will 
then be expanded differently depending on which namespace it is in.  I have
tested this on my test wikimedia (1.4beta5) and it works.  Here are some hints
as to how to do it sanely:

First, decide on what nameing scheme to use.  I would recommend that the english
wikipedia be set up something like:

Premble generic text that is needed for all the wikipedia's.
{{Extra_new_page_text_for_{{NAMESPACE}}}}

Then, when the text is reached, it will expand differently depending on the
namespace.  For example, in the main namespace, it will expand to:
Premble generic text ...
{{Extra_new_page_text_for_}}

Which will then expand the template {{Extra_new_page_text_for_}}

If, instead it is in Talk, it will expand to:
Premble generic text ...
{{Extra_new_page_text_for_Talk}}

So, now the only thing to do is to get all the appriate templates defined.

To do that, I would recommend adding these to Talk:newarticletext:

{{Extra_new_page_text_for_}}

{{Extra_new_page_text_for_{{subst:ns:1}}}}

{{Extra_new_page_text_for_{{subst:ns:2}}}}

{{Extra_new_page_text_for_{{subst:ns:3}}}}

...



{{Extra_new_page_text_for_{{subst:ns:14}}}}

{{Extra_new_page_text_for_{{subst:ns:15}}}}

Then, you just need to eliminate all the red links by filling in the appropriate
text.

Now, if you want to add text specfic to say, catagory pages, just edit
{{Template:Extra_new_page_text_for_Category}}.  I would recommend protecting 
{{Template:Extra_new_page_text_for_}} since it will be seen every time that a
user hits a red link, but the rest can probably be safely left unprotected.

I am not an admin, so I cannot do this on the English wikipedia, but it requires
no new features in the software.
Comment 22 filzstift 2005-02-07 10:37:30 UTC
(In reply to comment #21)

The solution was implemented successful in the German Wikipedia; see
http://de.wikipedia.org/wiki/MediaWiki:Noarticletext
and
http://de.wikipedia.org/wiki/MediaWiki:Newarticletext

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


Navigation
Links