View Issue Details

IDProjectCategoryView StatusLast Update
0016653phplist applicationBounce Managementpublic26-03-13 12:43
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.11.7 
Target Version2.11.8Fixed in Version2.11.8 
Summary0016653: Orphan record in bounceregex_bounce table
DescriptionWhen using USE_ADVANCED_BOUNCEHANDLING and a rule whose action includes deleting the bounce, a record is inserted into the bounceregex_bounce table that is not deleted when deleting the bounce.

See file admin/processbounces.php from line 386.
Actions deleteuserandbounce, unconfirmuseranddeletebounce, blacklistuseranddeletebounce, and the default, all call function deleteBounce() which deletes rows from the bounce, user message bounce and bounceregex_bounce tables.
However, at this point of handling the bounce a row has not yet been inserted into bounceregex_bounce. That is not done until after the switch statement at lines 444-447. This leaves an orphpan row in that table.

Then when viewing the advanced bounce rule, page=bouncerule, there is a link to each related bounce, which is this case does not exist. Clicking that link displays the bounce page with a message 'Fatal Error: No such Record'.

My suggested solution is to move lines 444-447 to immediately prior to the switch statement on line 386.

All line numbers refer to release 2.10.18.

This problem was raised by a forum user, see http://forums.phplist.com/viewtopic.php?f=15&t=38058#p92241
Steps To ReproduceCreate an advanced bounce rule with action of unconfirmuseranddeletebounce and send message that will trigger a bounce that matches the rule.

OR
send a message that will generate a bounce and then use 'generate bounce rules' from the manage bounces page to generate a candidate rule. Then change the rule action to unconfirmuseranddeletebounce and make the rule active.

run 'process bounces' from the manage bounces page
this should execute the rule by unconfirming the user and deleting the bounce

run 'list bounce rules' and select the rule
at the bottom of the page are related bounces including a link to the now deleted bounce
click the link to generate the error message on the bounce page
TagsNo tags attached.

Relationships

related to 0016654 resolvedmichiel Deleting bounce does not remove row from bounceregex_bounce or user_message_bounce tables 

Activities

michiel

04-09-12 17:30

manager   ~0051724


isn't this the same as 0016654 ?

duncanc

05-09-12 08:49

developer   ~0051732

It is to do with bounces but is a different problem. The creation of the row in the bounceregex_bounce table needs to be before the switch statement in order that those cases that delete the bounce will also delete that row.

I have looked at the 2.11.7 source and the line numbers mentioned above are reduced by 2.