When items are created or changed they are added to the secondary storage. When they are deleted, their data needs to be cleaned up afterwards.
Version: unspecified
Severity: enhancement
Whiteboard: storypoints: 5
When items are created or changed they are added to the secondary storage. When they are deleted, their data needs to be cleaned up afterwards.
Version: unspecified
Severity: enhancement
Whiteboard: storypoints: 5
As a consequence of this undeletion of history does not work as the recreation of sitelinks leads to duplicate links in secondary storage.
Deleted items, then tried an undelete, and then got a failed assertion, possibly because the undeleted content isn't any longer a supported format? Could be a new bug and not related to secondary storage, even if it is triggered by it.
Warning: assert():
Assertion failed in /home/john/Workspace/core/includes/Revision.php on line 908 Call Stack: 0.0000 636320
Format application/x-wikitext is not supported for content model wikitext
Backtrace:
#0 /home/john/Workspace/core/includes/ContentHandler.php(788): ContentHandler->checkFormat('application/x-w...')
#1 /home/john/Workspace/core/includes/Revision.php(876): WikitextContentHandler->unserializeContent(''''LOKE'''??Con...', 'application/x-w...')
#2 /home/john/Workspace/core/includes/Revision.php(839): Revision->getContentInternal()
#3 /home/john/Workspace/core/includes/WikiPage.php(493): Revision->getContent(1)
#4 /home/john/Workspace/core/includes/WikiPage.php(374): WikiPage->getContent()
#5 [internal function]: WikiPage->isRedirect()
#6 /home/john/Workspace/core/includes/Article.php(1868): call_user_func_array(Array, Array)
#7 /home/john/Workspace/core/includes/Wiki.php(364): Article->__call('isRedirect', Array)
#8 /home/john/Workspace/core/includes/Wiki.php(364): Article->isRedirect()
#9 /home/john/Workspace/core/includes/Wiki.php(267): MediaWiki->initializeArticle()
#10 /home/john/Workspace/core/includes/Wiki.php(592): MediaWiki->performRequest()
#11 /home/john/Workspace/core/includes/Wiki.php(502): MediaWiki->main()
#12 /home/john/Workspace/core/index.php(58): MediaWiki->run()
#13 {main}
Line 908 is the assertion in the following code (From Revision.php)
/**
public function getContentHandler() {
if ( !$this->mContentHandler ) {
$model = $this->getContentModelName(); $this->mContentHandler = ContentHandler::getForModelName( model ); assert( $this->mContentHandler->isSupportedFormat( $this->getContentFormat() ) );
}
return $this->mContentHandler;
}
@John: yes, you are correct. After some discussion on wikitech-l, I changed the mime type for wikitext from application/x-wikitext to text/x-wiki.
Note that there is another related change imminent: in the future, content model and content format will be stored as integer ids in the database. This is a performance improvement requested by Asher. I'll write to the list about it.
Right. One situation where this can happen is this:
In this case, mediawiki doesn't know how to unserialize or display the page's content. Undeletion should and does fail. We could look into showing a nicer error page, but I think the case is so rare that that isn't necessary.