Template talk:Editnotice pagename

"MediaWiki:" and "MediaWiki talk:"
CharlotteWebb: You removed the "MediaWiki:" part of the pagename in this template's code. That means it no longer produced a complete properly formatted editnotice page address. I find that less usable and confusing and likely to cause mistakes. And as can be seen from your editnotice navbar you made exactly the mistake I expected people to do: You missed to supply the "MediaWiki:" part in the edit link, even though you yourself had changed the functionality of this template some minutes before that.

I also expect that even if people remember to add it they will from time to time misspell "MediaWiki:".

In your edit comment you stated two concerns: "Confusing as "pagename" variable doesn't include namespace. Plus we want to use this for mw and mw talk links."

With "pagename variable" I assume you mean the magic word. And right, this template is more like the magic word. But naming this template editnotice fullpagename is longer, and I know from experience that most Wikipedia editors prefer as short names as possible. (I myself don't mind long names.) But we can of course make editnotice fullpagename a redirect to editnotice pagename, and list it as an alternative name in its documentation.

And your second concern points out that we need to be able to easily make editnotice talk page links. Well, no problem! Either we can add a "talk" parameter to this template. Like this:. Which will instead produce a "MediaWiki talk:" address. I think that will be more user-friendly and less error prone than if the users always have to type " ". Or perhaps even better, we can make a template named editnotice talkpagename, just like the magic word.

--David Göthberg (talk) 16:59, 8 September 2008 (UTC)


 * Doesn't really matter much as it's probably not going to be directly used anywhere outside of MW namespace. Should work properly now with the "talk" parameter.
 * Hey I noticed the bit about slashes being converted to hyphens, which seems to be workable-around by using the titleparts crap, but the more sinister effect is that it is possible to create two differently titled pages which share an edit-notice? I guess if this ever becomes an issue we would need to use more parser-functions (directly on the editnotice) in order to disambiguate. — CharlotteWebb 17:52, 8 September 2008 (UTC)


 * Ah, good that you feel that way. And as you can see I did choose to not use the "talk" parameter but instead make a separate editnotice talkpagename template, since I think that is somewhat more user-friendly. The reason I want editnotice pagename to be as easy to use as possible is that I am thinking that people might use this template to create a link to the editnotice, since they will have problems to manually create the proper editnotice address. That is, I will write up advice that says something like: "If you want to make an editnotice then a good way to find the proper address for it is to first open the edit window for the current page, then place this code on the page, then preview the page and follow the link to the editnotice."
 * And regarding name collisions: Oh, thanks for discovering that, I had not noticed that. But unfortuntely the MediaWiki software itself converts pagenames to editnotice names that way. At least as far as I understood when I read the code they use for the conversion. (I should probably reread that code now that we know more.) So for instance the two pages "Super-doc" and "Super/doc" will have the same editnotice according to the MediaWiki software. So there is not much we can do about that. Such colliding editnotices will have to use an #if case and the magic word or so, to figure out which page they are currently shown on and thus show the right message.
 * Another sad effect of the conversion is that we can not automatically link back from an editnotice page to its subject page, since template programming has no way of converting in the other direction.
 * I guess in the light of all this we now know that it might have been better that MediaWiki doesn't convert "/" to "-" in the editnotice names. After all, there is nothing inherently bad in using subpages in MediaWiki space.
 * --David Göthberg (talk) 18:17, 8 September 2008 (UTC)


 * I agree, we should find out whether replacing "/" by "-" is absolutely necessary. — CharlotteWebb 18:34, 8 September 2008 (UTC)


 * What you just said can mean two things, so here goes: The MediaWiki software does the conversion from "/" to "-" thus we have to do it too. But if you mean we should talk to the devs and ask them if they can change MediaWiki so it doesn't do the conversion then I agree with you, we should probably do that.
 * And can you please stop destroying the templates I have coded? You broke them again. Your version of editnotice pagename does not work and has more complex code. Don't you even check what output you get from a template after you have changed its code? That just goes to show that it isn't easier to put all functionality in the same template, since the code and usage then becomes complex.
 * And something I have wanted to say to you for a long time: Could you please start to use edit comments? It is especially annoying when you edit long talk pages like the Village Pump. We who watch those pages have to actually load a diff for each edit you do to see what sections you have edited. Why do you even bother to delete the section title from your edit summary field? It's automatically added to that field since it is very useful.
 * --David Göthberg (talk) 18:53, 8 September 2008 (UTC)


 * Obviously I'm referring to whether it is necessary for the software to convert it. The rest is a long story in which I mistakenly put "uc" instead of "lc". Should work now. — CharlotteWebb 19:04, 8 September 2008 (UTC)

These templates now part of the editnotice procedure
As I had planned: I have now added editnotice pagename and editnotice talkpagename in the description of how to create editnotices over at Editnotice. That means they are now part of the procedures there.

--David Göthberg (talk) 04:21, 9 September 2008 (UTC)

Does not return namespace number
If you edit User talk:Gadget850, it shows the notice at MediaWiki:Editnotice-3-Gadget850, but the Editnotice pagename at the bottom of the notice shows "MediaWiki:Editnotice--Gadget850". --—— Gadget850 (Ed)  talk  -  11:37, 9 September 2008 (UTC)


 * Gadget850: Oops, that was my fault. Fixed. And that made me take a closer look at the changes that CharlotteWebb had done, and catch a similar bug in them. Now the editnotice pagename and editnotice talkpagename works correctly for talk pages, both for user talk pages and for editnotice talk pages.
 * --David Göthberg (talk) 13:05, 9 September 2008 (UTC)

Links
Is there a particular reason this template doesn't link to the page? It seems it would be more convenient to have a version that links to the target. --Philosopher Let us reason together. 19:44, 4 November 2008 (UTC)


 * I assume you mean the fact that it produces the pagename but doesn't surround it with, right? The reason for that is that I originally made this template so we could use it inside the v-d-e links we were/are thinking of adding to the editnotice template. And then it can not have built-in linking. That is, this template is used inside editnotice navbar, that is in turn meant to be used on top of editnotice.
 * It was not until later I realised humans could also use this template directly to find the editnotice page. (If we add the v-d-e links then we still need a way to find the editnotice page for editnotices that have not yet been created.)
 * I was going to make a more complete version for human usage, with links both to the editnotice and its talk page. And if on a user page it would also show links to the user editable editnotice.
 * But while I was coding that one I came up with the editnotice loader, which could replace all these old clumsy solutions. Unfortunately some of the "big guys" here at Wikipedia have misunderstood the purpose of the editnotice loader and thus objected to it. So at the moment it is unclear how the editnotices should work, and thus I have stopped doing any coding for them until we have a consensus for how they should work.
 * --David Göthberg (talk) 20:34, 4 November 2008 (UTC)

Namespaces
Generally if it is never going to be subst'ed you can just use &amp;#32; to avoid trimming the space. But for namespaces you want to use, etc. This would make it easier to copy the template to other-language projects and avoid problems when namespace names change, e.g. "Image" → "File". — CharlotteWebb 18:10, 21 April 2009 (UTC)


 * Right of course, changed it. I copied the hardcoded template from the previous template and didn't even think about it. Cheers, Amalthea  00:16, 22 April 2009 (UTC)