Page MenuHomePhabricator

trackback.php not saving pings
Closed, ResolvedPublic

Description

Author: jimhu

Description:
trackback.php is not saving pings into the trackbacks table...
or, it looks like it's inserting them and then deleting them, which doesn't make
sense from my very limited understanding of the code.

When I ping, I get a success XML message, but nothing is added to the database.
To debug, I made a copy of trackbacks.php and echoed the sql. Manually running
this in mysql inserts just fine, but the tb_id is incremented every time I run
trackbacks.php and get XMLsuccess()

print_r ($dbw) reports that the insert statement is the last statement before
XMLsuccess() is called. I also get no error messages in either the httpd log or
in /var/mysql/hostname.err. However, print_r ($dbw) reports

[mFailFunction] => 1

I don't know what that means.


Version: 1.8.x
Severity: normal
URL: http://ecoliwiki.org

Details

Reference
bz6447

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:18 PM
bzimport set Reference to bz6447.
bzimport added a subscriber: Unknown Object (MLST).

Trackbacks are disabled by default. Please ensure that you
have enabled them.

jimhu wrote:

I already have

$wgUseTrackbacks = true;

in LocalSettings.php. Is there something else I need to set?

kaikkd wrote:

Forget to commit a transaction?

I insert "$dbw->commit();" after $dbw->insert in trackback.php,
it works fine.

robchur wrote:

As far as I can tell, the code doesn't begin a transaction, so one doesn't need
to be committed. Oh, and trackback.php is a lesson on how not to write PHP.

Fixed in r32314.

Removed bogus dependency on bug 7147.