Hello. If I manually delete post from LJ and then try to un-crosspost corresponding drupal node I will get error '302 cannot edit post'. So I suugest to change current ljxp_delete($node) to something like:
if (!$response = xmlrpc(ljxp_destination($ljxp), 'LJ.XMLRPC.editevent', $message)) {
$errno = xmlrpc_errno();
if ($errno == 302) {
drupal_set_message(t('The corresponding livejournal post was probably manually deleted. Node was marked as not crosspos
drupal_set_message(t('LiveJournal crossposting error: ') . xmlrpc_errno() . ': ' . xmlrpc_error_msg());
db_query("DELETE FROM {ljxp_node} WHERE nid = %d", $node->nid);
}
else {
drupal_set_message(t('LiveJournal crossposting error: ') . xmlrpc_errno() . ': ' . xmlrpc_error_msg());
return FALSE;
}
}
else {
drupal_set_message(t('LiveJournal crosspost successful.'));
db_query("DELETE FROM {ljxp_node} WHERE nid = %d", $node->nid);
}
Comments
Comment #1
valthebaldHi,
can you please make a patch from this code? Will be easier to intergrate.
Thanks.
Comment #2
valthebald