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

valthebald’s picture

Assigned: Unassigned » valthebald

Hi,
can you please make a patch from this code? Will be easier to intergrate.
Thanks.

valthebald’s picture

Version: 6.x-1.5 » 6.x-1.6
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.