Last modified: 2011-01-06 21:54:26 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 T28613, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26613 - HTMLForm changes broke stashed uploads
HTMLForm changes broke stashed uploads
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.17.x
All All
: Normal major (vote)
: ---
Assigned To: Bryan Tong Minh
:
Depends on:
Blocks: 26611
  Show dependency treegraph
 
Reported: 2011-01-06 20:39 UTC by Bryan Tong Minh
Modified: 2011-01-06 21:54 UTC (History)
3 users (show)

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


Attachments

Description Bryan Tong Minh 2011-01-06 20:39:00 UTC
HTMLForm changes broke stashed uploads because wpSourceType is double prefixed with wp. Need to find out where.
Comment 1 Bryan Tong Minh 2011-01-06 20:41:02 UTC
To reproduce, upload a file that does raise a warning and click "ignore and submit file anyway button"
Comment 2 Bryan Tong Minh 2011-01-06 21:31:01 UTC
In 1.16 hidden fields were unconditionally not prefixed with wp, whereas in 1.17 in certain cases they are, breaking backwards compatibility. It kinda sucks to break an interface after only a single release.
Comment 3 Happy-melon 2011-01-06 21:53:34 UTC
$form = new HTMLForm( array(
	'Text' => array(
		'type' => 'text',
		'default' => 'foo',
	),
	'TextOverridden' => array(
		'type' => 'text',
		'name' => 'DifferentTextOverridden',
		'default' => 'foo',
	),
	'ArrayName' => array(
		'type' => 'hidden',
		'default' => 'foo',
	),
	'ArrayNameOverridden' => array(
		'type' => 'hidden',
		'name' => 'DifferentArrayNameOverridden',
		'default' => 'bar',
	),
) );
$form->addHiddenField( 'FunctionName','baz' );
$form->setTitle($this->getTitle());
$form->displayForm('');

=== 1.16.1 ===

<input name="wpText">
<input name="wpTextOverridden">
<input type="hidden" name="FunctionName">
<input type="hidden" name="ArrayName">
<input type="hidden" name="ArrayNameOverridden">

=== trunk ===

<input name="wpText">
<input name="DifferentTextOverridden">
<input type="hidden" name="FunctionName">
<input type="hidden" name="wpArrayName">
<input type="hidden" name="DifferentArrayNameOverridden">

The main change in 1.17 was to introduce the 'name' override: if you specified 'name' => 'Foo' in the descriptor array, that would be used unconditionally, and without any modification.  That applies to all types of fields.  Given that, there's no reason to special-case hidden fields *except* for B/C.  And as I said on IRC, I'd rather have it consistent and transiently incompatible, than inconsistent forever.

Specific issue raised was fixed in r79758.

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


Navigation
Links