Last modified: 2008-03-11 21:34:23 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 T15100, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13100 - Allow title for new comments to come from the URL
Allow title for new comments to come from the URL
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Normal enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-22 03:59 UTC by Mike Dillon
Modified: 2008-03-11 21:34 UTC (History)
3 users (show)

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


Attachments
Modifies prepolution of edit form to recognize a "preloadtitle" parameter for new sections (1.10 KB, patch)
2008-02-22 03:59 UTC, Mike Dillon
Details
Replacement for previous patch... (1.50 KB, patch)
2008-03-01 06:04 UTC, Mike Dillon
Details

Description Mike Dillon 2008-02-22 03:59:12 UTC
Created attachment 4662 [details]
Modifies prepolution of edit form to recognize a "preloadtitle" parameter for new sections

The attached patch enables the use of a "preloadtitle" URL parameter to pre-populate the comment title when section=new is passed. This allows for simple creation of comments on a centralized page where the comment title is defaulted to the name of the page hosting the link. This would be useful on Wiktionary for the new feedback functionality we have been experimenting with over the last week or so, among other things. The patch was created today from SVN trunk.
Comment 1 Mike Dillon 2008-02-22 17:07:19 UTC
After some discussion on English Wiktionary's Beer Parlour, it may make more sense for this to apply to more than just new sections. If that were the case, it would probably make more sense for it to be called "preloadsummary" instead of "preloadtitle". The patch would be more complicated for that case since the interaction with the preloaded section comments would need to be worked out in the case of editing an existing section.
Comment 2 Conrad Irwin 2008-02-22 18:56:55 UTC
I assumed that preload itself doesn't work for editing already existing sections, wouldn't that overwrite the contents that should be there? I think that the "preloadtitle" is an adequate name for the feature - as that is what it would be used for. This would be very useful for creating RfV/RfD (add to page) links as well. 
Comment 3 Ran Ari-Gur (User:Ruakh on WMF projects) 2008-02-22 19:12:58 UTC
> I assumed that preload itself doesn't work for editing already existing
> sections [...]

Correct. preloadsummary, however, might be useful more generally; it could
perhaps be appended to the default summary. (I can't say that I care much one
way or the other. This simply came up because my temporary JavaScript solution
doesn't check to make sure it's on a section=new page, so would support
preloadtitle on any page. If people don't like that, we can stick with
preloadtitle.)
Comment 4 Mike Dillon 2008-02-26 20:42:03 UTC
Has anyone had a chance to look at this patch? I'd be happy to make any changes necessary to get it into SVN.
Comment 5 Roan Kattouw 2008-02-26 22:41:34 UTC
Patch applied as posted in r31329
Comment 6 Ran Ari-Gur (User:Ruakh on WMF projects) 2008-02-26 22:47:05 UTC
Thanks! :-)
Comment 7 Mike Dillon 2008-03-01 06:04:40 UTC
Created attachment 4681 [details]
Replacement for previous patch...

The previous patch just went live and did not work correctly. The value of $this->summary was being wiped out after being set (in the initialiseForm() method).

This revised patch reverses the earlier patch and does the check for "preloadtitle" inside of initialiseForm() instead of inside importFormData(). It adds a global import of $wgRequest in initialiseForm() because the request parameters are not available in that method otherwise.

I have tested this patch in a local MediaWiki installation, unlike the previous patch (*hanging head in shame*).
Comment 8 Roan Kattouw 2008-03-01 09:47:32 UTC
I fixed this issue in r31419. The line in initialiseForm() blanking $this->summary was completely useless as $this->summary is blank by default anyway.
Comment 9 AlexSm 2008-03-11 21:34:23 UTC
Would it be possible to make "preloadtitle" work on section=0? 

That's another case when summary is blank, so it would be nice to have the option to pre-populate it from URL.

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


Navigation
Links