Posts Tagged ‘error’

Delicious’s Bad Behavior

Recently I’ve been having this problem with my WordPress + Bad Behavior + Delicious blog posting combo, in a nut shell, delicious was showing an error:

[10/22/08 05:00:03 AM -0700] Creating blog post at http://correct_url.com/xmlrpc.php ...ERROR: Failed due to General Exception: Curl returned non 200 HTTP code: 417. Response body:

And I couldn’t work out why, after some digging/googling, I thought to look in my bad behaviour logs, and found a match for my apache log…


76.13.6.189 - - [19/Oct/2008:23:00:29 +0100] "POST /xmlrpc.php HTTP/1.1" 417 796 "-" "PEAR_XML_RCP2/0.0.x"

I’ve contacted both yahoo (who now own delicious)

Hello Nick,

Thank you for writing to del.icio.us Customer Care.

I understand that the Delicious blog posting feature is not working
properly for you. I apologize for any inconvenience.

Our engineers are aware of this issue and are investigating possible
solutions, but since this is not and “official” feature, we do not have
any specific time frame when this will be fixed.

Please let me know if you have any further questions or concerns.

Thank you again for contacting del.icio.us Customer Care.

Regards,
Alessandra

and Michael Hampton (Bad Behavior Developer)

Looks like they are sending an unexpected Expect: header and they are
failing to retry the request without Expect:. You should report this to
them so they can fix it.

as you can see they have confirmed that there is indeed a problem ….. But as you may have noticed delicious posted on my blog, no the problem hasn’t been fixed, but there is a work around.

In ~/wp-content/plugins/bad-behavior/bad-behavior/whitelist.inc.php you can add delicious’s IP address, it’s not a perfect solution as it’ll be overwritten everytime BB is updated, but it’ll do for now :)

UPDATE: I’ve had many requests for this…

OLD: whitelist.inc.php

// IP address ranges use the CIDR format.

        // Includes four examples of whitelisting by IP address and netblock.
        $bb2_whitelist_ip_ranges = array(
                "64.191.203.34",        // Digg whitelisted as of 2.0.12
                "208.67.217.130",       // Digg whitelisted as of 2.0.12
                "10.0.0.0/8",
                "172.16.0.0/12",
                "192.168.0.0/16",
//              "127.0.0.1",
        );

NEW: whitelist.inc.php

// IP address ranges use the CIDR format.

        // Includes four examples of whitelisting by IP address and netblock.
       $bb2_whitelist_ip_ranges = array(
                "64.191.203.34",        // Digg whitelisted as of 2.0.12
                "208.67.217.130",       // Digg whitelisted as of 2.0.12
                "76.13.6.189",          // Delicious
                "10.0.0.0/8",
                "172.16.0.0/12",
                "192.168.0.0/16",
//              "127.0.0.1",
        );

We’re a bit Mashed!

My Apologies to all, the transition to the my new theme hasn’t gone as smoothly as I’d have liked, images are off line, and the adverts are all in the wrong place. Normal service will be resumed as soon as possible.

Call to undefined function: register_sidebar_widget

So WP2.5 is out, and I figured it was about time I squashed that load bug on phpbb_recent_topics, while I’m at it I figure I’ll wigetize it.

The problem is that the example on the automattic site doesn’t actually work! If you paste…

function widget_myuniquewidget($args) {
    extract($args);
?>
        <?php echo $before_widget; ?>
            <?php echo $before_title
                . 'My Unique Widget'
                . $after_title; ?>
            Hello, World!
        <?php echo $after_widget; ?>
<?php
}
register_sidebar_widget('My Unique Widget','widget_myuniquewidget');

Into a blank plugin you get this in your logs…

PHP Fatal error:  Call to undefined function:  register_sidebar_widget()

Now I’ve not been bothered to dig out the exact reason why yet, something to do with the sidebar loading, but you need to wrap the whole lot up in an init function, so try this instead…

function widget_init_myuniquewidget() {
	// Check for required functions
	if (!function_exists('register_sidebar_widget'))
		return;

	function widget_myuniquewidget($args) {
	    extract($args);
	?>
	        <?php echo $before_widget; ?>
	            <?php echo $before_title
	                . 'My Unique Widget'
	                . $after_title; ?>
	            Hello, World!
	        <?php echo $after_widget; ?>
	<?php
	}
}

// Delay plugin execution until sidebar is loaded
add_action('widgets_init', 'widget_init_myuniquewidget');

I just need to work out now, how to add wiget options to the wp-admin panel and the next verions of my plugin will be done :)