(WBRP)

Wordpress 2.8 Breaks RMRH Plugin

June 17, 2009 @ 18:13:04

(It’s fixed….see second update below)

I just updated this site to use the latest WP (2.8) and now my “Read More Right Here” plugin doesn’t work quite right. When you click the “Read More” text, the rest of the post successfully downloads and is displayed. However, the next “click” takes you to the post’s single page display instead of just collapsing the new content.

I will hopefully get this sorted out soon. Whenever I do, I’ll update here.

UPDATE:

Unfortunately I haven’t been able to fix this. The problem is caused by the latest version of jQuery (1.3.2), to which WP apparently updated. Actually, it was caused somehow in the changes made in between 1.2.6 and 1.3.

Specifically, the function curCSS is throwing exceptions during the animation of the new content “away” (i.e. hiding).

800
var computedStyle = defaultView.getComputedStyle( elem, null );

The elem parameter being passed to getComputedStyle that causes the exception is a “\n“. With jQuery 1.2.6, I don’t see that element being passed to that function.

I tried some of the other animation techniques, but they I guess they all hit curCSS at some point or another. Even plain old hide causes problems.

So…..sorry. As of right now, the RMRH plugin does not work with WP 2.8. The only solution I can see at the moment is to include the older version of jQuery with the plugin. But I’m not sure yet how that will work out.

UPDATE 2: FIXED

It’s funny how a day away can make a difference. It only took about 10 minutes to get this fixed.

So I knew that jQuery couldn’t have a defect that serious that wasn’t already fixed. The most recent version has been available for more than four months now, and too many people use it for that issue to still be around. I figured the the problem had to be how I was creating the new content that is inserted into the DOM.

My previous method for doing this was:

var newEl = $j("<p> + newContent + </p>");

And the fixed method of the above code is:

var newEl = $j("<p>").html(newContent);

All I can think is that the use of "<p> + newContent + </p>" somehow results in newline characters (/n) being inserted as part of the string. The new method does not use string operators, only the <p> element and its html content are created.

Anyway, it’s fixed. If you use the “Read More Right Here” plugin and have updated to Wordpress 2.8, you need to update the plugin to version 1.0.3.

22 Comments

Follow Comments