diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index 04c306c54b..d4d67b562e 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -586,6 +586,9 @@ class ApiVisualEditor extends ApiBase { break; case 'serializeforcache': + if ( !isset( $parserParams['oldid'] ) ) { + $parserParams['oldid'] = Revision::newFromTitle( $title )->getId(); + } $key = $this->storeInSerializationCache( $title, $parserParams['oldid'], $html ); $result = array( 'result' => 'success', 'cachekey' => $key ); break;