Last modified: 2014-02-24 18:25:29 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 T55153, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53153 - &(append|prepend)Text option for index.php action=edit
&(append|prepend)Text option for index.php action=edit
Status: NEW
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-21 14:00 UTC by Technical 13
Modified: 2014-02-24 18:25 UTC (History)
3 users (show)

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


Attachments

Description Technical 13 2013-08-21 14:00:22 UTC
[[mw:Manual:Parameters_to_index.php#Edit_and_submit]] could use a little updating, but more importantly, there doesn't seem to be any appendText and/or prependText to be able to add a post to the bottom of a section on a page.  Please add this (maybe similar to [[mw:API:Edit#Parameters]]).
Comment 1 MZMcBride 2013-08-21 14:10:00 UTC
I think most people use &action=edit&section=new to append text.

However, there seems to be a design issue in whatever you're working on. Most parameters to index.php are historical artifacts, because index.php pre-dates api.php. api.php is the canonical and supported means by which any program, script, or tool should be interacting with MediaWiki.

api.php has both prependtext and appendtext (and many other parameters) in its action=edit module. Before additional parameters are proposed or added to index.php, you'll need to provide a use-case that explains why api.php is insufficient.
Comment 2 Technical 13 2013-08-21 15:06:54 UTC
(In reply to comment #1)
> I think most people use &action=edit&section=new to append text.
> 
> However, there seems to be a design issue in whatever you're working on. Most
> parameters to index.php are historical artifacts, because index.php pre-dates
> api.php. api.php is the canonical and supported means by which any program,
> script, or tool should be interacting with MediaWiki.
> 
> api.php has both prependtext and appendtext (and many other parameters) in
> its
> action=edit module. Before additional parameters are proposed or added to
> index.php, you'll need to provide a use-case that explains why api.php is
> insufficient.

I was under the impression that api.php couldn't be used from the address bar, was I misinformed  If so, I'll close the ticket invalid and use api.php. :)
Comment 3 MZMcBride 2013-08-21 15:10:03 UTC
(In reply to comment #2)
> I was under the impression that api.php couldn't be used from the address
> bar, was I misinformed  If so, I'll close the ticket invalid and use api.php.
> :)

This isn't a use-case. The API can be accessed via the address bar: <https://www.mediawiki.org/w/api.php>.
Comment 4 Technical 13 2013-08-21 15:25:40 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I was under the impression that api.php couldn't be used from the address
> > bar, was I misinformed  If so, I'll close the ticket invalid and use api.php.
> > :)
> 
> This isn't a use-case. The API can be accessed via the address bar:
> <https://www.mediawiki.org/w/api.php>.

The API can't be POSTed to via the addressbar...

[11:22] <T13> https://en.wikipedia.org/w/api.php?title=Wikipedia_talk:AutoWikiBrowser/CheckPage&action=edit&section=2&appendtext=%2A+%7B%7BAWBUser%7C%7B%7BREVISIONUSER%7D%7D%7D%7D+%7E%7E%7E%7E%7E&summary=Requesting%20%5B%5BWP%3AAWB%7CAWB%5D%5D%20permissions&token=6195efc3b45ada8cc529a95f5a0ef1f7%2B%5C


[11:23] <T13> <error code="mustbeposted" info="The edit module requires a POST request" xml:space="preserve">
[11:23] <T13> hrmm.  So... Assuming this can't be done from addressbar...
[11:23] <T13> in "a link"
[11:24] <svick> T13: yeah, it can't
Comment 5 db [inactive,noenotif] 2013-08-22 17:32:54 UTC
Have a look at [[Special:ApiSandbox]], which can submit api requests as get or post

You should provide a use case, where you have to use a appendtext and cannot use section=new (maybe with nosummary=).
Comment 6 Technical 13 2013-08-22 18:15:54 UTC
(In reply to comment #5)
> Have a look at [[Special:ApiSandbox]], which can submit api requests as get
> or post
> 
> You should provide a use case, where you have to use a appendtext and cannot
> use section=new (maybe with nosummary=).

https://en.wikipedia.org/w/index.php?title=Wikipedia_talk%3AAutoWikiBrowser%2FCheckPage&diff=569755880&oldid=569696764

Was with

https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:AutoWikiBrowser/CheckPage&action=edit&section=new&preload=Wikipedia_talk:AutoWikiBrowser/CheckPage/PermissionRequest&summary=Requesting%20%5B%5BWP%3AAWB%7CAWB%5D%5D%20permissions&wpIgnoreBlankSummary=1&wpMinoredit=1&wpWatchthis=1&nosummary=1

Which although it didn't give me a warning, it also didn't apply the
&summary=Requesting%20%5B%5BWP%3AAWB%7CAWB%5D%5D%20permissions and placed it at
the bottom of the page under the "bots" section instead of inserting it at the
bottom of the "users" section.  The purpose of this specifically is to add a
button on that page that a user can click to open the edit window pre-filled in
and all they have to do is click save to insert there name/request in the
"users" section=2 for approval.

Other use cases would be to improve the "Submit this draft" buttons on the
[[Template:AFC submission/draft]] and [[Template:AFC submission/declined]]
templates where the ability to prepend the submission template to the top of
section=0 is desired.

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


Navigation
Links