Recent Topics

1 Apr 07, 2005 18:26    

b2evolution v0.9.0.11

For anyone updating their blog via email, if Blo.gs is selected in the back office for pinging ... getmail.php will generate a MySQL error at this step.

The blo.gs ping works fine for me if I save a new entry via the back office. But it tosses out the following from getmail.php:

1

Subject: blog: BLO.GS

Content-type: text/plain, boundary:

Raw content:

b2user:b2password
BLO is back ON ... error?
END

Login: b2user, Pass: b2password

Category ID: 32

Blog ID: 7

Sending pingbacks...
Pingbacks done.

Pinging b2evolution.net...
Response: Your record for this blog has been updated.

Done.

Pinging Weblogs.com...
Response: [1] [Thanks for the ping, however we can only accept one ping every half-hour.]

Done.

Pinging Blo.gs...
MySQL error!

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1(Errno=1064)

Your query:
SELECT * FROM evo_blogs WHERE blog_ID =

Obviously, the quick work-a-round would be to turn OFF the blo.gs ping.

I've not had a look at the php file to see what might be yielding the error. Will report back if I find a fix.

-Scott

2 Apr 07, 2005 19:08

It doesn't seem to matter if the extended RSS ping is turned ON or OFF in _advanced.php, either method seems to generate the mySQL error.

getmail.php appears to just call each of the ping functions:

	$blogparams = get_blogparams_by_ID( $blog_ID );
		pingback( true, $content, $post_title, '', $post_ID, $blogparams, true);
		pingb2evonet( $blogparams, $post_ID, $post_title);
		pingWeblogs($blogparams);
		pingBlogs($blogparams);
		pingTechnorati($blogparams);

Which appear to be defined in /b2evochore/_functions_pings.php. I can only think that something is wrong with the "pingBlogs" function?

/*
 * pingBlogs(-)
 *
 * pings Blo.gs
 */
function pingBlogs( & $blogparams, $display = true ) 
{
	global $use_blodotgsping, $use_rss, $blogname, $baseurl, $blogfilename;
	if( !get_bloginfo('pingblodotgs', $blogparams) ) return false;
	// echo 'ping Blo.gs';
	if( $display ) 
	{
		echo "<div class=\"panelinfo\">\n";
		echo "<h3>", T_('Pinging Blo.gs...'), "</h3>\n";
	}
	if( !preg_match( '#^http://localhost[/:]#',$baseurl) ) 
	{
		flush();
		$url = get_bloginfo('blogurl');
		$client = new xmlrpc_client('/', 'ping.blo.gs', 80);
		if ($use_rss) 
		{
			$message = new xmlrpcmsg('weblogUpdates.extendedPing',
								 array( new xmlrpcval( get_bloginfo('name', $blogparams) ), 
								 				new xmlrpcval( get_bloginfo('blogurl', $blogparams) ), 
												new xmlrpcval( get_bloginfo('blogurl', $blogparams) ), 
												new xmlrpcval( get_bloginfo('rss_url', $blogparams) ) 
											) );
		}
		else 
		{
			$message = new xmlrpcmsg('weblogUpdates.ping', 
								array(new xmlrpcval( get_bloginfo('name', $blogparams) ), 
								 				new xmlrpcval( get_bloginfo('blogurl', $blogparams) )
											));
		}
		$result = $client->send($message);
		$ret = xmlrpc_displayresult( $result, '', $display );
		if( $display ) echo "<p>", T_('Done.'), "</p>\n</div>\n";
		return($ret);
	} 
	else 
	{
		if( $display ) echo "<p>", T_('Aborted (Running on localhost).'), "</p>\n</div>\n";
		return(false);
	}
}

I tried running getmail with debugging turned ON, but that didn't yield anything different (no more screen output and no file generated). Not sure what it's supposed to do.

Anyway ... it appears that the only way to blog via email and NOT generate this error, is to uncheck the "Ping blo.gs" box in the Back Office (Blogs tab -> select blog -> Advanced tab -> uncheck box).

It should be noted that the entry is added to the DB, despite the error. However, BECAUSE of the error, getmail terminates at that point and the emailed entry is NOT DELETED (which means that each time the getmail crontab job runs, the entry is added AGAIN).

Maybe someone with more PHP programming skills can find a fix? :?:

-Scott


Form is loading...