Api: Allow creation of new section without header but with summary
Open, LowPublic

Description

Using the gui action=edit&section=new without a summary, no == == is generated in the save content.

For the api the module action=edit have a summary and a sectiontitle param. Using a summary and a empty sectiontitle generated a == == with the content of the summary. In my opinion the empty sectiontitle param should suppress == ==, but the summary param should still used for a summary.

When that get fixed, a gadget can still generate non headered section (often a subst template contains the headers), but used the summary to say, that is coming from a gadget.


Version: 1.22.0
Severity: minor

Details

Reference
bz52747
bzimport raised the priority of this task from to Low.
bzimport set Reference to bz52747.
bzimport added a subscriber: Unknown Object (MLST).
Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Feb 19 2015, 6:56 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 30 2015, 10:53 AM

@Umherirrender I don't understand your request fully. Can it be that for a casual user it is impossible to
retrace your issue!?
Comparable to T28312 (normally there is no separate summary and sectiontitle)

What I understand is, if in the text is an headline, then made it to the summary section.
I have this functionality implemented here:
https://de.wikipedia.org/wiki/Benutzer:Perhelion/sectionSummary
https://de.wikipedia.org/wiki/Benutzer:Perhelion/sectionSummary.js

Perhelion added a comment.EditedDec 31 2015, 12:43 PM

Maybe this is owing to the hack of the German Common.js, which does (enforces a section edit to all new edits):

/**
 * Fügt eine Betreffzeile auf leeren Artikel-Diskussionsseiten ein
 */
if( mw.config.get( 'wgNamespaceNumber' ) === 0 || mw.config.get( 'wgNamespaceNumber' ) === 1 ) {
 $(function() {
  $( '#ca-talk.new a' ).attr( 'href', function( index, attr ) {
   return attr + '&section=new';
  });
 });
}

I do propose WONTFIX, because a section edit must always have a new section (this is the simple and main definition of it), this is a feature not an obstacle what we need to change. I think what @Umherirrender want is rather similar to a reverse of the German code above!?

This bug is about a compare of two functions. The one is the action=edit&section=new of index.php (gui part) and the other is action=edit of api.php (api part).

The gui part with action=edit&section=new gives two input fields, one for the summary/new header and one for the text. When the summary input field is empty and the user press the save button, the text of the text input field is now saved at the end of the page without a new header and without a edit summary.

The api part has the same behaviour, but I want create a edit without a new header and with a edit summary (for example the header is coming from a substituted template, like a welcome template). To get this work a possible way is to provide a empty sectiontitle= in the api request to explicit say that the summary= should not be used as sectiontitle=

It has nothing to do with javascript on dewiki which overrides links, it does not change forms or requests. The javascript also only doing something for non-exist talk pages. The requested behaviour here is also for existing pages.

Catrope removed a subscriber: Catrope.Jan 15 2016, 10:57 PM