Last modified: 2014-08-18 17:01: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 T13415, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11415 - __EDITPARENTSECTION__
__EDITPARENTSECTION__
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.22.0
All All
: Lowest enhancement with 11 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
http://is.wiktionary.org/wiki/fredag
:
Depends on:
Blocks: section-editing
  Show dependency treegraph
 
Reported: 2007-09-21 03:53 UTC by Connel MacKenzie
Modified: 2014-08-18 17:01 UTC (History)
15 users (show)

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


Attachments

Description Connel MacKenzie 2007-09-21 03:53:34 UTC
The Icelandic Wiktionary (and most others, except en:) would like the ability to edit sections.  Currently, they use a series of language heading templates that insert the section headings.  Since this causes the target ''template'' to be edited, they turn it off (currently) using __NOEDITSECTION__.  They very much would rather that the [edit] link appears, but would edit the corresponding parent section of the calling page (e.g. http://is.wiktionary.org/w/index.php?title=fredag&action=edit&section=1 ) instead.

Because the new users often put headings at the wrong level, it is strongly desired to have the number of "=" signs trapped withing the heading template.  (e.g. {{-da-}}.)  I showed them how to use the headings with the =={{-da-}}== form, but they were very, very strongly opposed to doing that (from past newbie experiences.)

It would be blissful, if instead, there was an __EDITPARENT__ or __EDITPARENTSECTION__ magic word, instead of the __NOEDITSECTION__ they currently use.
Comment 1 Dominic 2007-09-21 04:44:36 UTC
Note that this would actually be useful at en.wiktionary, too, and there's nothing particularly Wiktionary-specific about it, either; it would be generally useful.
Comment 2 Eysteinn Gudni Gudnason 2007-09-21 05:12:25 UTC
I can see great use for it at is.wikiquote and fr.wikiquote as well.
Comment 3 Eysteinn Gudni Gudnason 2007-09-21 06:49:21 UTC
This would be especially useful if the edit button could be fully controlled. Changing the font size, color and position. 
Comment 4 spacebirdy 2007-09-21 08:07:40 UTC
This would be very useful to many wiktionaries (also very big ones like fr.wiktionary) as they are dictionaries and should always use the _exact_ same layout for entries.
Comment 5 Danny B. 2007-09-21 10:40:36 UTC
1. Think about template included in template which is included in page. Now which "parent" should be edited?

2. What would you edit? What is the parent section? There is in fact no parent section except for entire page source editing:

----
'''Foo''' is bar.

{{some template with header|params}}

{{some other template with header|params}}

{{another template with header|params}}

categories, interwikis....
----

See - there's no parent section although page contains headers. There's nothing to edit.

If you need the same layout for entries, use eg. preload parameter in URL. Or subst the appropriate templates. How many times you edit them? I'd say, they're fixed for ages, so there's no worry about having different layout on different pages when substing them.
Comment 6 Connel MacKenzie 2007-09-21 16:44:30 UTC
(In reply to comment #5)

Please look very closely at the examples given.  Yes, there are sections of data in the parent to be edited; in your example, each of those sections would be two lines.  On All the Wiktionaries, those sections are many lines (often hundreds of lines.)

All Wiktionaries already use the preload templates extensively (much moreso than any Wikipedia.)  We're talking here about a complicated layout format that newbies constantly screw up on.  Having the precise heading level given by a transcluded (not subst:'d) template is fairly essential for things to not break.

At the same time, it is very beneficial for section editing to still be enabled.  That is the request here...to make section editing on fr.wikt/de.wikt work like it does on en.wikt (because en.wikt has enough sysops and automation to constantly fix the newbie errors.)

With this "Magic word" implemented, en.wikt: could finally use the same format as all the rest of the Wiktionaries.

Please do not be so dismissive.  A great deal of time, effort and thought went into this proposal.  (Years, actually.)
Comment 7 Connel MacKenzie 2007-09-21 16:47:07 UTC
(In reply to comment #3)
> This would be especially useful if the edit button could be fully controlled.
> Changing the font size, color and position. 
> 

Steinninn, the edit button already /is/ customizable via CSS.  Please do not distract from the main issue of this bug.
Comment 8 Steve Sanbeg 2007-09-21 19:34:46 UTC
It's not clear to me what this magic word would apply to.  Assuming that a "parent section" is just the previous non-"child section", there at least needs to be a way to mark the child sections.  So there would either have to be some way to mark sections, or some kind of function to specify a template's sections should point back to the parents, i.e.

==parent==
==child== _EDITPARENT_

or 

==parent==
{{child}}

where child is like
{{EDITPARENT|template:child}}
==child section==

Comment 9 Connel MacKenzie 2007-09-21 20:05:07 UTC
(In reply to comment #8)

Sorry for not giving a clearer example.  So, here is one.  For page [[foobar-one]], we'd have something like this with "////" indicating my arbitrary page boundaries:

////start text of [[foobar-one]]
{{wikipedia}}
{{was wotd|2007|February|31}}
{{-en-}}

{{-noun-}}
{{en-noun|-}}

# A fronobulous [[widget]].

----

{{-es-}}

{{-verb-}}
{{es-verb|foobar-oneish}}

# To [[snazzelize]] a thryumph.
////end text of [[foobar-one]]

The {{wikipedia}} and {{was wotd}} templates would be in section "0" and write the heading stuff they do now, on en.wiktionary.org.  (Eye candy stuff.)

The templates that start and end with "-" in their template names, include only a heading (plus any formatting spans, categories and the like, within the heading.)  (These currently do not exist on en.wiktionary, but do exist and are mandatory on almost all other wiktionaries.)

The normal language inflection templates would be just as they are today on en.wiktionary.

So, here would be the new templates:

////start text of {{-en-}}
__EDITPARENTSECTION__
==English[[Category:English language]]==
////end text of {{-en-}}

////start text of {{-es-}}
__EDITPARENTSECTION__
==Spanish[[Category:Spanish language]]==
////end text of {{-es-}}

////start text of {{-noun-}}
__EDITPARENTSECTION__
===Noun===
////end text of {{-noun-}}

////start text of {{-verb-}}
__EDITPARENTSECTION__
===Verb===
////end text of {{-verb-}}

In practice, the templates obviously would be more complicated, with additional formatting, images (especially on the French Wiktionnaire) and such like.

Currently, on non-en Wikt:'s, the {{-en-}} and {{-es-}}, the "Magic word" in use is "__NOEDITSECTION__" as the [edit] links would otherwise direct the edits to /the templates/ instead of the desired section of the desired page.

To illustrate this example:

1a) Clicking [edit] to the right of the "English" heading,
1b)  should result in an edit of sections one and two of [[foobar-one]].
2a) Clicking [edit] to the right of the "Noun" heading,
2b)  should result in an edit of section two of [[foobar-one]].
3a) Clicking [edit] to the right of the "Spanish" heading,
3b)  should result in an edit of sections three and four of [[foobar-one]].
4a) Clicking [edit] to the right of the "Verb" heading,
4b)  should result in an edit of section four of [[foobar-one]].

<Now, I understand that 1b and 3b may be too painful to implement.  If 1b edits only section one, and 3b edits only section three, that would probably work out to everyone's satisfaction.  But I will guess that you'd prefer the behavior to match the current methods.>
Comment 10 Dan Bolser 2010-05-31 04:56:05 UTC
This would be a very useful feature for my Semantic MediaWiki / Semantic Forms wiki.

Very often in SMW/SF wikis, structured data is entered using templates. Following each template is a 'free text' section for the page. Currently, the last line of my template reads "<H1>Free text</H1>", giving the free text section a heading, but making sure that users won't accidentally start editing the template (which happens all the time otherwise).

I would love for them to be able to click '[edit]' on the Free text section heading and then be taken to edit the page itself, not the template.
Comment 11 Waldir 2011-05-15 17:39:43 UTC
Related bugs: bug 2795 and bug 8515 (perhaps this bug should this be marked as a duplicate of one of those)
Comment 12 Quim Gil 2013-04-02 04:29:50 UTC
This request is not specific to a skin. I have seen requests for other magic words being filed under Parser, so I'll try there.
Comment 13 Platonides 2013-04-08 12:06:36 UTC
The problem is that edit section works by cutting by == == markers.

So with a content like:
 
{{wikipedia}}
{{was wotd|2007|February|31}}
{{-en-}}

{{-noun-}}
{{en-noun|-}}

# A fronobulous [[widget]].

----

{{-es-}}

{{-verb-}}
{{es-verb|foobar-oneish}}

Everything would be in section 0 of the article page, even though there are headers inserted by the templates.
Comment 14 Amgine 2013-04-08 16:05:36 UTC
Template expansion has never been done? yet ?action=edit&section=4 still works.

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


Navigation
Links