Archive for the 'blogging' Category

Hampden bridge. The only surviving suspension bridge in Down Under.

This entry is also available in: Русский

I just love big creations of engineering minds. Mad minds, sometimes. At least I still can’t really understand how did they manage to build such enormous thing as Sydney Harbor Bridge in 1930′th. Of course, I have read its history and seen archive photos, but the amount of the work they did still looks enormous (and it really was enormous!) to me.

But, as it happens, Australia still has something not that gigantic but not even a bit less exciting monument of engineering genius. Before we stopped for a lunch at Cambewarra lookout, we passed Kangaroo valley, where we did not find any kangaroos (and we did not really look for them, actually), but we have found something very spectacular. That was Hampden bridge. If you follow the link, you may find that the bridge was build in the end of 19th century and it is still in use, and RTA regularly checks its condition and it is still safe. Pretty amazing, isn’t it?

Hampden bridge. Side view.

Read more…

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.