Page MenuHomePhabricator

Regression with ContentModel checking of page id
Closed, InvalidPublic

Description

Author: servus

Description:
Following code raise error because of ContentModel checking. This checking attempt to get page id. Where I disable checking manually in MW code, 1.21 perfectly processed it:

#$data is some array, $user is User
$row = array(

'page' => 0,
'user' => $user->getID(),
'user_text' => $user->getName(),
'minor_edit' => 1,
'timestamp' => $data['timestamp'],
'comment' => $data['comment'],
'text' => $data['text']

);

$revision = new Revision( $row );
$Id = $rev->insertOn( $dbw );

(After this code I use $wikipage->insertOn() or $wikipage->updateRevisionOn() and revision tables updates, after this new revision has been inserted without errors and can be viewed on site).

Or currently we have another functions to insert custom revision in database ?


Version: 1.21.x
Severity: normal
Whiteboard: aklapper-moreinfo

Details

Reference
bz47433

Event Timeline

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

Hi Tank,

which exact MediaWiki version are you running?

(In reply to comment #0)

Following code raise error

Which exact error message?

because of ContentModel checking.

In which file (and path) is the code located?

Tank: Could you please answer comment 1?

Unfortunately closing this report as no further information has been provided.

Tank: Please feel free to reopen this report if you can provide the information asked for and if this still happens. Thanks!