I just realized that if a page has leading newlines, on every page edit exactly one line is removed. This is no expected behaviour, is it? I'd expect, that a null edit does not change the page.
Marcus Buck
On 1/17/09, Marcus Buck wiki@marcusbuck.org wrote:
I'd expect, that a null edit does not change the page.
Even in "normal" circumstances this is never a safe assumption.
Let's I save a page [[A]] with {{subst:foobar}} the template for which doesn't exist yet. Then I create the template, possibly to contain something offensive. Then you accidentally vandalize page [[A]] when attempting to do a null (or completely unrelated) edit.
A better question to ask is whether there is some reason to strip white space at one end of the page but preserve it at the other end.
I'm thinking it would be better to strip it all from both ends unless we explicitly use __START__ / __END__ etc.
—C.W.
Let's I save a page [[A]] with {{subst:foobar}} the template for which doesn't exist yet. Then I create the template, possibly to contain something offensive. Then you accidentally vandalize page [[A]] when attempting to do a null (or completely unrelated) edit.
Back in the day, we used to use null edits intentionally to update pages after templates changed. Now we have the job queue to do that for us, but it still works as far as I know.
On 1/17/09, Thomas Dalton thomas.dalton@gmail.com wrote:
Back in the day, we used to use null edits intentionally to update pages after templates changed. Now we have the job queue to do that for us, but it still works as far as I know.
That's nice I know. This does have its uses but there ought to be some way to do this other than the usual get and post. Maybe some kind of &action=null which handles it internally and skips the pre-save transform and any surprises that may create. Something like &action=purge but more thorough (?).
—C.W.
2009/1/18 Charlotte Webb charlottethewebb@gmail.com:
On 1/17/09, Thomas Dalton thomas.dalton@gmail.com wrote:
Back in the day, we used to use null edits intentionally to update pages after templates changed. Now we have the job queue to do that for us, but it still works as far as I know.
That's nice I know. This does have its uses but there ought to be some way to do this other than the usual get and post. Maybe some kind of &action=null which handles it internally and skips the pre-save transform and any surprises that may create. Something like &action=purge but more thorough (?).
There's rarely any need now we have the job queue, so I'm not sure it's worth the time it would take to implement such a feature. Null edits work well enough for the few times they are needed.
On 1/17/09 4:13 PM, Marcus Buck wrote:
I just realized that if a page has leading newlines, on every page edit exactly one line is removed. This is no expected behaviour, is it? I'd expect, that a null edit does not change the page.
This is bug 12130: https://bugzilla.wikimedia.org/show_bug.cgi?id=12130
-- brion
wikitech-l@lists.wikimedia.org