Page MenuHomePhabricator

[REGRESSION] When attempting to add text through action=edit&section=new on user script pages, an internal error occurs
Closed, ResolvedPublic

Description

Bug title for later reference (in case it is changed):
When attempting to add text through action=edit&section=new on user script pages, an internal error occurs

How to reproduce the issue?
With administrative privileges, go to
https://commons.wikimedia.org/w/index.php?title=User:Rillke/common.js&action=edit&preload=MediaWiki%3AVisualFileChange.js%2Finstall.js&editintro=Template%3AInstall+script-editintro&section=new
and press "Save" without filling in the subject (if you would, you would invalidate the JavaScript).

Current behaviour:
This reproducibly gives:
Internal error
[574fa4cd] 2013-01-09 15:37:24: Fatal exception of type MWException

Expected behaviour:
The line contained in the edit form is added to the existing contents of the user's JavaScript file.

Why is this an issue?
You may think it does not make sense - adding sections to JavaScripts. That's true. But adding arbitrary text to user script files e.g. to import other user scripts makes sense. section=new is the only way achieving this without using of the API.

Why is this marked as regression?
Because it worked as described in "Expected behaviour:" before.

How could a fix look like?
Either "Expected behaviour:" is restored or an other way is provided, adding text (JavaScript code) to JavaScript pages without having the user to copy&paste, type or whatever.

What, if you are unable reproducing the bug:
Copy Wikimedia Common's user Rillke's settings (user language: de, no edit toolbars, ...) to your account and try it again.


Version: 1.21.x
Severity: normal
URL: https://commons.wikimedia.org/wiki/Help_talk:VisualFileChange.js#.22Fatal_exception_of_type_MWException.22_while_instaling

Details

Reference
bz43784

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:31 AM
bzimport set Reference to bz43784.
bzimport added a subscriber: Unknown Object (MLST).

I bet content handler issue now that those pages aren't "wikitext"

  • This bug has been marked as a duplicate of bug 43008 ***