Topic on Extension talk:DynamicWikiSitemap

Jump to navigation Jump to search
Valeriocipriani (talkcontribs)

Notice: Uncommitted DB writes (transaction from DatabaseBase::query (LCStoreDB::get)). in /web/htdocs/www.xxx.ext/wiki/includes/db/Database.php on line 4262

Any idea how to solve this issue?

I am using "rev_timestamp" sorting criterion

Valeriocipriani (talkcontribs)

for me the solution was to close the connection with DB after the query:

open sitemap.php

search for:

function writeSitemap( $offset, $limit, $serverBase, $totalCount ) {

    $queryOptions = $this->getQueryOptions( true );

    $criterion = $this->getSortingCriterion();   

    $dbr =& wfGetDB( DB_SLAVE );   

    $res = $dbr->select( array( 'page', 'revision' ),

    array(

    "'Popularpages' AS type",

    'page_id AS id',

    'page_namespace AS namespace',

    'page_title AS title',

    '( MAX( rev_timestamp ) ) AS last_modification',

    '( MIN( rev_timestamp ) ) AS creation_timestamp',

    '( COUNT(rev_timestamp) ) AS revision_count',

    "$criterion AS value"

    ),

    $queryOptions,

   

__METHOD__,

    array(

    'GROUP BY' =>'page_id',

    'ORDER BY' => $this->getOrder(),

    'LIMIT' => $limit,

    'OFFSET' => $offset

    )

    );

       

add after:

    $dbr->commit(); //This is to close the connection with the DB after the query                   

    it should be done for every query, 3 at all in my case

Reply to "MW 1.26.2 db error"