Page MenuHomePhabricator

Allow editing sections in a page where the sections are created with templates
Closed, DeclinedPublic

Description

Author: wikt.3.connelm

Description:
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.


Version: 1.22.0
Severity: enhancement
URL: http://is.wiktionary.org/wiki/fredag

Details

Reference
bz11415

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:57 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz11415.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Sep 21 2007, 3:53 AM

mcdevitd wrote:

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.

steinninn wrote:

I can see great use for it at is.wikiquote and fr.wikiquote as well.

steinninn wrote:

This would be especially useful if the edit button could be fully controlled. Changing the font size, color and position.

spacebirdy wrote:

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.

  1. Think about template included in template which is included in page. Now which "parent" should be edited?
  1. 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.

wikt.3.connelm wrote:

(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.)

wikt.3.connelm wrote:

(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.

ssanbeg wrote:

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

wikt.3.connelm wrote:

(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.>

dan.bolser wrote:

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.

Related bugs: bug 2795 and bug 8515 (perhaps this bug should this be marked as a duplicate of one of those)

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.

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.

wmf.amgine3691 wrote:

Template expansion has never been done? yet ?action=edit&section=4 still works.

Please note that the French Wiktionary now uses section templates included in the standard equal signs, like :

== {{langue|fr}} ==
=== {{S|étymologie}} ===

All sections templates are now like that, so this bug doesn't concern fr.wiktionary anymore.

I suggest any other project to try and transition to templates that don't include section levels.

I think I'll close this bug as there is probably no way that this feature request will ever be fulfilled.

Darkdadaah closed this task as Declined.Dec 4 2014, 11:24 AM
Darkdadaah set Security to None.
Darkdadaah renamed this task from __EDITPARENTSECTION__ to Allow editing sections in a page where the sections are created with templates.Mar 9 2015, 3:26 PM
Darkdadaah added a project: Wiktionary.
Darkdadaah moved this task from Backlog to Resolved on the Wiktionary board.
Meno25 removed a subscriber: Meno25.Sep 26 2016, 2:24 PM