Currently I have hundreds of SPAM trackbacks I want to delete.

I see the "check all" button is there -- thank you for implementing that. It does indeed select all.

However when I select the delete option in the select list, and click the "Update Trackbacks" button ... the page reloads, but nothing is deleted. The same is true if I individually click on one of the checkboxes and click on the Update Trackbacks button.

If, however, I click on the Delete link to the side of one of the items, and go through the delete steps, then the trackback is deleted. But that's not the point, really, because it's such a circuitous route to follow to delete trackbacks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kindafun’s picture

I have had the exact same experience.

zorac’s picture

Status: Active » Needs review
FileSize
2.98 KB

I fix this issue.

sKanD’s picture

Thank you for the patch!
I also have hundred of spams and that patch spared me from flushing the database in phpmyadmin as i used to.

beginner’s picture

Status: Needs review » Needs work

the patch can only work if you have the spam module enabled. It removes an important check.

beginner’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
750 bytes

It was a simple bug that affected people who do NOT have the spam module.
Tested: works.

beginner’s picture

The patch just above must be applicable to HEAD too.

It fixes the immediate problem, but I notice that there is a lot of code redundancy between the function spam_delete_trackback and the function trackback_delete.
The code can be optimized in many places.

beginner’s picture

FileSize
3.64 KB

Forget my previous patch. My apologies to zorac: not only his patch fixes the bug, but it also removes the code redundancy I was speaking about. This new patch is the same as his, but with one more little code optimization (don't call module_exist('spam') twice in a row, but use $spam_module_exists that was set the first time.)

this patch is good to go.

zorac’s picture

Never mind :-)

I seem trackback module is a patchwork now.
I wish to rewrite it but ...

beginner’s picture

Rewrite it?
I don't think it's such a good idea:
http://www.joelonsoftware.com/articles/fog0000000069.html

Now, if you wish to improve it, clean it, etc... try to get cvs access to this module, so that you can commit your own patches.
And if you need help, contact me: the issue queue is not that long, but needs some love.

zorac’s picture

You are right. I don't wish to rewrite it but i wish to clean it :-)

Thanks for your proposal. I'll think about it.

dgrant’s picture

I used beginner's most recent patch above and it works now. Thanks.

matt@antinomia’s picture

FileSize
3.9 KB

The patch works well for me.

Additionally, there was an error in the drupal_goto() in trackback_received_delete() that didn't handle the URL fragment (#trackbacks) correctly. The attached patch fixes this as well.

Christoph C. Cemper’s picture

Hey,
none of these patches work

when I try to applay the last one trackback_10 I get

missing header for unified diff at line 2 of patch
Assertion failed: p_base <= file_pos, file ../patch-2.5.9-src/pch.c, line 771

can you attach your recent 4.7 trackback module or just commit it there?

(btw I could commit it too as I plan to implement akismet stuff as well)

Christoph C. Cemper’s picture

Assigned: Unassigned » Christoph C. Cemper
Status: Reviewed & tested by the community » Closed (fixed)

I could apply this stuff and fixed in in the last 4.7.x version with my akismet integration
merge to the 5.x version still pending, but closing this now as the 4.7.x tree works