lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal

No translations available for this entry

As many others, before starting my own blog website, I had an account on livejournal.com. And, of course, I really value LiveJournal community and did not want to lose my hard-earned LiveJournal friends. At the end, it wouldn’t be fare if I just said “thank you everyone and goodbye” and closed (or stopped updating) the journal when I could just setup a piece of software that doubles posts I made here to my JiveJournal blog.

What I actually did. I have got livejournal-crossposter plugin, version 2.0, which was the most recent stable version by that moment, installed it and was surprised as it started working immediately without any funny effects despite it was not tested to work with WordPress 2.3.1.

So far so good but when I was searching for more feedback on this plug-in, I spotted a couple of comments where people complained that sometimes it spawns a duplicate posts in LiveJournal blog, but I did not pay attention to it then… until I started to have the same problem here. Yes, under some circumstances this great plug-in could really multiply entries in your LJ account.

The good thing is that it does not do it uncontrollably - it did not create thousands clones of your posts while you’re sleeping, thankfully it does it far less often. Actually, the only occasion I noticed entries in my LJ spawn was when I was editing the post which already was published and had an entry in LJ blog. So, if you want to check whether your configuration is affected, do the following:

  • Create and publish the post in WordPress. Make sure it gets crossposted to LJ
  • Edit that post. Change one of LiveJournal settings, say, disable comments (or enable, if it was previously disabled)
  • Save the post.
  • Go to you LJ blog and, if you don’t see two copies of that post there, stop reading.

Right, If you continue reading this article, you have got duplicate post. Now I ought to say that I already submitted a bug report and offered a workaround so I hope a new version of plug-in is coming soon, but until then some may be interested in fixing it right now. It is not that hard as it seems

Open lj_crosspost.php file in your favorite text editor. Find function ljxp_save() (it has to start at line 871) and insert the following right after function block start (line 872):
get_post_meta($post_id,’ljID’,true);
Now save the file and upload it to your plug-in directory.

After that it should work well.
I don’t think it is plug-in’s issue, it rather seems that this bug has something to do with how WordPress 2.3.1 caches post metadata so this bug may not appear at all on older (or upcoming) WordPress versions. My fix just forces WordPress to load and cache all metadata before plug-in access it.

0 Responses to “lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal”


  1. No Comments
del.icio.us:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal digg:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal spurl:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal wists:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal simpy:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal newsvine:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal blinklist:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal furl:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal reddit:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal fark:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal blogmarks:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal Y!:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal smarking:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal magnolia:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal segnalo:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal gifttagging:lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal

Leave a Reply

Login with OpenID

(enter URL like xxxx.livejournal.com)

Or stay anonymous