views:

75

answers:

1

I am trying to use the trackback library in codeigniter, but I am always get this

An unknown error was encountered

The following is my code(controller). There is other code validating the form etc but not effecting the trackback

    $id = $this->input->post('id');
    $ping_url = $this->input->post('ping_url');
    $title = $this->input->post('title');
    $entry = $this->input->post('entry');
    $url = "http://shivabeach.com/journal/journal_view/$id";
    if (isset($ping_url)) {
        $tb_data = array('ping_url' => $ping_url, 'url' => $url, 'title' => $title,
            'excerpt' => $entry, 'blog_name' => 'Shivabeach', 'charset' => 'utf-8');

        if (!$this->trackback->send($tb_data)) {
            echo $this->trackback->display_errors();
        } else {
            echo 'Trackback was sent!';
        }

    }

I get my trackbacks from the site I am pinging, all data come from a form that works perfectly without the trackback. I use Isset($ping_url because the backtrack field may be empty at times. I also have the trackback library autoloading

Any thoughts?

edit. I have managed to get rid of the "A PHP Error was encountered" part, now i just get the unknown error. I had a field named "class"

+1  A: 

Do you have error reporting on (for CodeIgniter) and have it set to report all events? It looks like a CI error and the log may provide some clue as to what's going on.

drewjoh
Yes, error reporting is set to "all" by default, and I verified that it is on. The code I am using comes straight out of the user guide. Worse, the error logs simply indicate what I already see "ERROR - 2010-02-22 21:57:28 --> An unknown error was encountered"
Brad
Ok I solved it, at least I got rid of the error. Its too embarrassing to tell you what it was. But i will say always watch the number of characters you allow in a url form field (too few)
Brad