New 2.1.10 LP release today

13 views
Skip to first unread message

Tania Morell

unread,
Mar 8, 2010, 3:24:42 AM3/8/10
to livepre...@googlegroups.com
Hi folks,

First I need to apologize for my long absence from this plugin's maintenance duties.   I was aware that it had stopped working for myself and others after the 2.8 WordPress release.  But oddly I also continued getting positive feedback that indicated the plugin was working well.

I discovered the root of the problem yesterday and I find quite amusing.

Please read my blog post for those details. 
http://www.digsite.net/2010/03/07/banned-because-of-livepress-bad-behavior

To make a long story short for anyone who rather not read the above post.  The bottom line is that LivePress was causing the host's IP to get banned by LiveJournal due to excessive connection attempts.  

This plugin had been loading a specific function which connects to LJ with every single page load of Wordpress.  LJ's limit is 5 connections per second.  A bot could be indexing your site, triggering LP to wreak havoc on LJ. 

I can only guess that LJ put an auto-ban solution in place around the same time 2.8 was released which would explain the timing of start of this issue.

I updated the plugin to only connect to LJ when it absolutely has to; posting/editing/deleting/admin page.   Please  download and install  2.1.10 .

There is one catch, updating the plugin doesn't guarantee it will work right away.  If your site has been banned by LJ, then you'll have to wait until that ban expires and it looks like that is 2 months from the time the abuse stops.

I've emailed LiveJournal to see if there's anything I can do to shorten this timeframe.  

But in the meantime you should either disable the plugin if you're not using it, or download the new one as soon as possible.

I appreciate your patience with this matter (and from my absence).   My LivePress sabatical is over and I"ll be releasing additional updates soon.

-Tania

kirilisa

unread,
Mar 10, 2010, 9:41:02 PM3/10/10
to LivePress Plugin
Hey,

I really love this plugin. Since updating the plugin to 2.1.10 a day
or two ago, however, it's not working for me... that is, the LJ
options (user pic, friends lists, moods, synch, etc. etc.) aren't
showing up on my Wordpress New Post page. I read your blog post about
LJ banning for too many connections, but that wouldn't cause the
livepress to not show those LJ options when making a new post, as far
as I can see. I don't think I'd been banned by LJ, anyway, as I've
been using the plugin successfully for the past few months. I
deactivated all my other plugins to make sure there wasn't some
strange conflict going on. Any ideas?

Thanks!

Tania Morell

unread,
Mar 11, 2010, 3:51:39 AM3/11/10
to livepre...@googlegroups.com
Thanks for the heads up, kirilisa.  I will check this tomorrow. 

-Tania


--
You received this message because you are subscribed to the Google Groups "LivePress Plugin" group.
To post to this group, send email to livepre...@googlegroups.com.
To unsubscribe from this group, send email to livepressplug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/livepressplugin?hl=en.


Tania Morell

unread,
Mar 11, 2010, 5:08:02 PM3/11/10
to livepre...@googlegroups.com
Hi kirilisa,

I had a chance to look into this today.   Can I ask what version of WordPress you're running?  I'm not able to duplicate what you said isn't working.

 I click on 'New Post', and I can see the "Live+Press Extras" box below close to the bottom of the page.  I have see moods, music, and the other options normally.

Let me know !!

-Tania


Elise Bosse

unread,
Mar 11, 2010, 5:16:29 PM3/11/10
to livepre...@googlegroups.com
Hi Tania,

I am using 2.9.2. I know, it's so confusing. There must be some conflict or else something really simple and obvious but I can't think what, since I disabled all the other addons and looked over my livepress settings about 5 times. Maybe I will take a look at the code to see if I can figure it out...! 

Elise



--

Elise Bosse

unread,
Mar 11, 2010, 8:04:43 PM3/11/10
to livepre...@googlegroups.com
I have figured it out. It all comes down to the check on line 663 (or thereabouts) of LivePress/lpextras.php. I have no SCRIPT_URI. I did a bit of googling and this has something to do with Apache and virtual hosts. Anyway, I wonder if there is a better way of checking if one is in the backend since SCRIPT_URI can't necessarily be relied upon?

I also have a question regarding the display of userpics and journals to post to... Once I got rid of the SCRIPT_URI check, above, all the LJ options came back when making a new post (hurray!) but the select boxes for "userpic" and "post to" are empty. I looked at this and saw that the select boxes are indeed there in the code, but marked as display:none while two empty select boxes are made to display (as indicated in lpextras.php in the user_pics function) instead. I can't find any JS or anything that would change these select boxes to be displayed sometime (I didn't look very hard though). There must be a reason this is coded this way -- am I missing something? For the time being, I'm just going to get rid of the display:none and see how it goes.

The selection of the custom friends'lists when you choose Custom no longer works either. I see in the code that the JS has been deactivated for that, and that even if it were activated it doesn't refer to the appropriate element anyway... Again, don't know if this was intended to be changed later.

Thanks!

Elise

Tania Morell

unread,
Mar 11, 2010, 10:11:20 PM3/11/10
to livepre...@googlegroups.com

Elise,

Thanks so much for your work on this!  I could use some help and more information about your hosting service before I could determine if there's a better way to get the script_uri info the plugin needs. 

I'm attaching a simple phpinfo script here called phpinfo.php.  Could you copy that script into the same directory as livepress?  (wordpress/wp-content/plugins/livepress/)
Then open it up in your browser  (http://yourblog.com/wp-content/plugins/livepress/phpinfo.php
You will see LOTS of info about your hosting environment there.
Please save that page as html and send that to me in an email to ta...@digsite.net .

That would really help me see what's going on and determine how livepress should be changed.

I really appreciate it!

thanks!
-Tania
phpinfo.php

Elise Bosse

unread,
Mar 12, 2010, 8:48:45 AM3/12/10
to livepre...@googlegroups.com
Hi Tania,

My phpinfo is here: http://kirilisa.com/phpinfo.php. I'll probably leave it up for a week or so then take it down. 

But, I think that you can use

if (is_admin())

instead of checking the $_SERVER variable for SCRIPT_URI. Seems to work and is cleaner. See [http://codex.wordpress.org/Conditional_Tags]

BTW I think stripslashes should be added in lpadmin.php at about line 706 and in lpextras.php at lines 560 and 562 to take care of any apostrophes in the linkback text... I was running into slashing issues with that since my site is named Kirilisa's Den of Mischief. 

Hope you don't think I'm criticizing! It's a great plugin. I always end up editing any code I come across, for better or for worse; it's an unavoidable habit of mine :-P

Elise




-Tania

--

Tania Morell

unread,
Mar 15, 2010, 3:47:10 PM3/15/10
to livepre...@googlegroups.com
Hi Elise,

Thanks for the suggestions.  As you may have noticed there's a new release that corrects the issue of empty dropdowns.   I used your suggestion of using is_admin() in one part of the code.  But I need to be careful where to use that. 

Remember this code was inherited.  I didn't write it from the ground up.  Altho I have rewritten some parts of it,  I still don't fully agree with its flow and it's clunky and , imo, unecessarily large.  whenever lpextras is called, the plugin logs into the livejournal account(s).  And we know what too many of these logins can result in.

I would love to rewrite this thing from scratch.  But for now I think it's more important just to get it working and add a couple of the features people have been begging for for ages.  :)

I appreciate your input greatly, tho.  Keep 'er coming if you have anymore.  :)

Next, provided the plugin continues to "just work", I'm going to focus on adding support for the cyrillic alphabet and scheduled posts.

-Tania

Tania Morell

unread,
Mar 15, 2010, 3:49:01 PM3/15/10
to livepre...@googlegroups.com
Also, I saved a copy of your phpinfo page so I'll have it handy after you take it down. 

Elise Bosse

unread,
Mar 15, 2010, 7:39:46 PM3/15/10
to livepre...@googlegroups.com
Hi Tania,

Oh, I'm not criticizing, I'm just happy you are looking after the plugin! I know well enough what it is like to inherit code and then be torn because you have a burning desire to write it from scratch to make it streamlined and nice... but there just isn't time to do anything other than make fixes here and there! 

I upgraded to the newest version -- it's great that the dropdowns are fixed. I put back in my is_admin hack so it'll work with my setup, and also, speaking of foreign characters, I put back in a hack I made ages ago having to do with German umlauts. I don't know if what I've done is the best way to deal with that... http://wordpress.org/support/topic/337630

Elise




-Tania

--

digsite

unread,
Mar 19, 2010, 1:39:39 AM3/19/10
to LivePress Plugin
Elise,

I'll be releasing 2.1.12 in a couple days. SCRIPT_URI is gone from
the code with that one.

Once you install it, let me know if it works for you or not.

Btw, I never thought you were criticizing. Not at all, so don't think
that.

I've been fixing bugs over the last few days and beating my head over
post status transitions to fix scheduled posts. This is one I would
use regularly if I could get it working right!

-Tania

On Mar 15, 7:39 pm, Elise Bosse <kiril...@gmail.com> wrote:
> Hi Tania,
>
> Oh, I'm not criticizing, I'm just happy you are looking after the plugin! I
> know well enough what it is like to inherit code and then be torn because
> you have a burning desire to write it from scratch to make it streamlined
> and nice... but there just isn't time to do anything other than make fixes
> here and there!
>
> I upgraded to the newest version -- it's great that the dropdowns are fixed.
> I put back in my is_admin hack so it'll work with my setup, and also,
> speaking of foreign characters, I put back in a hack I made ages ago having
> to do with German umlauts. I don't know if what I've done is the best way to

> deal with that...http://wordpress.org/support/topic/337630

> > livepressplug...@googlegroups.com<livepressplugin%2Bunsu...@googlegroups.com>

Elise Bosse

unread,
Mar 21, 2010, 7:49:22 PM3/21/10
to livepre...@googlegroups.com
Hi Tania,

The new release is great. I can see all the LJ options on new posts, and I'm not having any more trouble with umlauts.  Excellent! 

The only issue I still noticed is that in the Live+Press settings page, at the "default link back blogname" it doesn't stripslashes the blogname, so, for example, when I  remove the \ from Kirilisa's Den of mischief and save settings and look at the settings again, it has gone back to Kirilisa\'s Den of mischief. Likewise the default linkback text as displayed when making a new post has the \ in it. But those things aren't a huge deal.

Have a good week!

Elise

digsite

unread,
Mar 21, 2010, 9:59:29 PM3/21/10
to LivePress Plugin
Elise,

I see what you mean! I'm working on that right now actually. I'll
get it corrected and a new release here soon. :-D

-T

Elise Bosse

unread,
Apr 10, 2010, 9:05:34 PM4/10/10
to livepre...@googlegroups.com
Hi Tania,

I saw you fixed the stripslashes thing in postback link -- awesome. But now I noticed something else which I didn't think was happening before... all my posts to LJ now have an extra <br /> after each paragraph. e.g. see http://kirilisa.livejournal.com/493786.html where there is a lot of whitespace between each paragraph because the HTML is
</p><br /><p> instead of </p><p>.

As far as I could tell in the code, what it posts to LJ in the synch_LJ function is just the content in <p></p> tags without a <br /> in there, so I'm kind of confused. Does this happen to you too? Is LJ's API somehow adding an extra <br />  between paragraphs?

Thanks,

Elise


Elise Bosse

unread,
Jun 21, 2010, 8:34:31 PM6/21/10
to livepre...@googlegroups.com
Dear Tania,

Regarding the below issue, I'm thinking that LJ's API itself, when receiving the info, is automatically putting in <br /> when it sees newlines in the posted content. Therefore, I just added a one-liner to your code to collapse $the_event onto one line so the below issue doesn't happen anymore.

I can't give exact line numbers as I deleted some comments and stuff, but in lpsynch.php, in the synch_LJ function, right after you add <br /><br /> to $the_event, I just added a little preg_replace:

$the_event .= '<br /><br />';       // your code                                                                                                                                
$the_event = preg_replace('/\r\n|\n/', '', $the_event); // my code

Take care,

Elise
Reply all
Reply to author
Forward
0 new messages