Last modified: 2008-12-19 21:45:20 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 T14621, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12621 - It's possible to create new empty pages using {{subst:}}, etc.
It's possible to create new empty pages using {{subst:}}, etc.
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-14 03:46 UTC by MZMcBride
Modified: 2008-12-19 21:45 UTC (History)
3 users (show)

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


Attachments

Description MZMcBride 2008-01-14 03:46:09 UTC
It's possible to create empty pages using {{subst:ns:0}} or {{subst:<an empty template>}}. Kinda confuses people when empty pages are created.
Comment 1 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-01-14 03:58:11 UTC
I think it would be necessary to move the check on line 785 of EditPage.php, in interalAttemptSave(), a level down to after the pre-save transform in Article::doEdit.  Or alternatively, move the PST a level up.  The latter is clearly undesirable; any save needs to be accompanied by PST, even if it's not through EditPage.  The former seems feasible enough.  Presumably you could save an empty page at present using the API, for instance (unless they've duplicated yet more logic), which this would prevent.

We could just allow empty articles to be created to begin with.  I mean, if you really want to create an empty article, that's sort of weird, but why not?  Maybe you're doing some #ifexist hackery or God knows what.
Comment 2 Roan Kattouw 2008-01-14 14:41:36 UTC
(In reply to comment #1)
> I think it would be necessary to move the check on line 785 of EditPage.php, in
> interalAttemptSave(), a level down to after the pre-save transform in
> Article::doEdit.  Or alternatively, move the PST a level up.  The latter is
> clearly undesirable; any save needs to be accompanied by PST, even if it's not
> through EditPage.  The former seems feasible enough.  Presumably you could save
> an empty page at present using the API, for instance (unless they've duplicated
> yet more logic), which this would prevent.
The API presently doesn't implement page editing/creation (there is an unmaintained and messy implementation written by the Vodafone folks), but any implementation in the future will use internalAttemptSave(). This means the PST should happen in internalAttemptSave() or in a function called by it (like doEdit()).
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2008-01-14 17:33:12 UTC
Well, at any rate Article::doEdit() isn't private, so it will affect *something*.  A few maintenance scripts, several SVN extensions, and includes/filerepo/LocalFile.php all use Article::doEdit() directly.
Comment 4 Brion Vibber 2008-01-14 23:50:17 UTC
Note that the reason we don't create blank pages is so that if you click a red link, then just submit the form, it doesn't create a useless blank page just because you were confused about what this wiki thing is.

If you want to go out of your way to make it so it turns out blank, well that's a bit silly but hardly the end of the world. We do allow saving blank pages after all.
Comment 5 Brion Vibber 2008-12-19 21:45:20 UTC
Resolving INVALID, since the issue doesn't apply to the reason we don't create empty pages.

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


Navigation
Links