I asked:
> What is the proper way to make an empty edit of an
existing article programmatically, in a maintenance script?
Bartosz Dziewonski replied:
I'd look at maintenance/edit.php if I were you :)
Thanks. I just tried the technique in edit.php and it worked great... at first. I merely
changed these lines, which get text from stdin:
# Read the text
$text = $this->getStdin( Maintenance::STDIN_ALL );
$content = ContentHandler::makeContent( $text, $wgTitle );
to reuse the original page content:
# Read the text
$content = $page->getContent();
and it produced a null edit as desired. But for some mysterious reason, the script hangs
if the article contains a scaled image ANYWHERE in it, such as:
[[File:Example.jpg|202px]]
Any idea why that would happen?
Thank you very much,
DanB