Cajunjoel added a comment.
Following up on this, since I've been digging deep into quickstatements and
magnustools..... I can't tell how this is supposed to have ever worked. After
jumping through some hoops with getting the database connection established via
magnustools (That's a discussion for another day, but suffice to say I've
forked his repo)
Inside **quickstatements/public_html/api.php** there's a block of code at
line 276:
if ( $submit ) {
$batchname = get_request ( 'batchname' , '' ) ;
$site = get_request ( 'site' , '' ) ;
if ( $site != '' ) $qs->config->site = $site ;
$user_id = $qs->getUserIDfromNameAndToken ( $username , $token ) ;
if ( !isset($user_id) ) {
unset ( $out['data'] ) ;
fin ( "User name and token do not match" ) ;
}
$batch_id = $qs->addBatch ( $out['data']['commands'] , $user_id ,
$batchname , $site ) ;
unset ( $out['data'] ) ;
if ( $batch_id === false ) {
$out['status'] = $qs->last_error_message ;
} else {
$out['batch_id'] = $batch_id ;
}
}
The relevant bit here is `$qs->addBatch` which is meant to add the batch to
the MySQL database for later retrieval, but the `$import` variable is not set
due to a `submit` value not being passed to `api.php`. //Ever.//
I would love to get a copy of the code as it exists on
https://quickstatements.toolforge.org/#/ to compare, because this, as it's
written simply doesn't work.
TASK DETAIL
https://phabricator.wikimedia.org/T234827
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Tarrow, Cajunjoel
Cc: Cajunjoel, hbeck001, Rongpenl, Addshore, Tarrow, Aklapper, Lydia_Pintscher,
WMDE-leszek, maantietaja, Samantha_Alipio_WMDE, Akuckartz, Jelabra, Nandana,
Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper,
Scott_WUaS, Asahiko, abian, despens, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs