Hi,

When I access the trackbacks queue, Select some and choose to delete them, I get:
Fatal error: Call to undefined function: _count() in /home/mohammed/www/modules/trackback/trackback.module on line 786

I didn't find this function defined anywhere.

I don't think it's a typo because it's repeated many times.

Comments

tostinni’s picture

Status: Active » Needs review
StatusFileSize
new1.35 KB

Hi,
Well this function exists but doesn't belong to trackback module, in fact it's a function from spam module.
So if you don't have spam module installed, it should correctly check it but trackback get a little bug there and doesn't make the check for a few functions of spam module it uses.

Here is a patch that correct this. It's made againt the last 4.6.0 version of trackback module, the 1.48

Hope it resolves your problem.

msameer’s picture

StatusFileSize
new1.36 KB

I was able to apply the patch after editing it because patch complained that it contains garbage!
But Ilost the choices in the "Update options" drop down menu.

Attached the dited patch.

tostinni’s picture

Ups sorry for the bad formatting of the patch.
Well I saw the lost of the option, the problem is that both update actions are linked to spam actions :

    if ($type == 'new') {
      $operations['trackback_spam_admin_unpublish'] = t('Unpublish the selected trackbacks');
    }
    else {
      $operations['trackback_spam_admin_publish'] = t('Publish the selected trackbacks');
    }
    $operations['trackback_spam_delete_spam'] = t('Delete the selected trackbacks (no confirmation)');

That's why I thought that this shouldn't appear in this select.

The problem is now that you can't delete/publish/unpublish selected trackbacks because your spam module isn't loaded.

Now I don't know how to fix it because I can't see normal functions to do the job.
I didn't have a lot of time right now, I look further during the afternoom.

Regards

ankur’s picture

A fix has been committed to HEAD, DRUPAL-4-6

Thanks for catching the problem and submitting patches. The previous follow-up has a point about there not being a normal, non-spam function for deleting trackbacks. I added one and changed the code to make use of it appropriately.

To see a diff to the previous revision, please consult:
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/trackback/tra...

Again, big time thanks for reporting and submitting patches.

-Ankur

ankur’s picture

Status: Needs review » Fixed
tostinni’s picture

Thank you for the quick correction ;)

msameer’s picture

Cool, Works like a charm!
You guys rock!

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)