Related Posts &Hellip Typo on Hover
-
When hovering over my Related Posts, the excerpt of my post pops up but ends with …
See: http://lelacappelle.com/winter-new-summer/
Hover over any of the Related Posts at bottom of pageIs there anything I can do to correct this issue?
Thanks,
John
-
hmmm… I tried to place &hellip in bold but didn’t work… sooo….
When hovering over my Related Posts, the excerpt of my post pops up but ends with &hellip
Is this a known bug ?
Good catch, it looks like you found a bug. Thanks for the report!
We’ll get this fixed. You can follow our progress, and try the patch I posted, here:
https://github.com/Automattic/jetpack/pull/1282You’re welcome!
Thank YOU for expertise !
I made the edit and it seems to be working. Nice job!
Hi Jeremy,
After updating to JetPack plugin to 3.2.1, the &hellip came back.
The code looks a bit different for your work-around.
Can you take a look and let me know what to use now?
http://lakepath.com/begins-southwest-michigan/
Thanks,
John
Oh wait… I see.
I went into : jetpack/modules/related-posts/jetpack-related-posts.php
Then commented out the original code and added replacement:
/**JRN EDIT Change This:
‘excerpt’ => $this->_to_utf8( $this->_get_excerpt( $post->post_excerpt, $post->post_content ) ),
To This:
*/
‘excerpt’ => html_entity_decode($this->_to_utf8( $this->_get_excerpt( $post->post_excerpt,
$post->post_content ) ),ENT_QUOTES, ‘UTF-8’ ),Yes, the fix wasn’t part of Jetpack 3.2.1 so you’ll need to make the changes yourself once again. It’s on our roadmap for 3.3, though.
Hi Jeremy,
I haven’t upgraded to 3.3 yet.
Was this issue resolved in 3.3, or do I need to manually edit after upgrading.
Thanks,
John
You’ll need to manually edit after upgrading, since we haven’t merged that change yet. We actually decided to fix the problem a bit differently, with this commit:
https://github.com/Automattic/jetpack/commit/bd1241da924f791f90227bb74191cfc765f05e6fWe still need to run some tests, but if the results are satisfying we’ll include the fix in the next Jetpack release.
Sorry for the inconvenience.
Hi Jeremy… no apologies necessary !
Really appreciate your insight & work !
John
FYI… after upgrading to JetPack 3.3, I did have to make the manual edits above (as expected).
However, before making those changes, I “hovered” over a few Excerpts and noted a related issue: If an Ampersand… “&”… was used in the text of the Related Post, it displayed as “amps;” in the pop-up excerpt.
So for example, if in a Related Post, “Lakefront homes & sites” was used, it would display as “Lakefront homes amps; sites” in the hover/pop-up text.
HOWEVER, after using the edits you recommended (noted below), the Ampersand was displayed correctly.
*************************manual edits********************
I went into : jetpack/modules/related-posts/jetpack-related-posts.phpThen commented out the original code and added replacement:
/**JRN EDIT Change This:
‘excerpt’ => $this->_to_utf8( $this->_get_excerpt( $post->post_excerpt, $post->post_content ) ),
To This:
*/
‘excerpt’ => html_entity_decode($this->_to_utf8( $this->_get_excerpt( $post->post_excerpt,
$post->post_content ) ),ENT_QUOTES, ‘UTF-8’ ),That’s interesting.
It might be worth trying to go to the Jetpack menu in your dashboard, scroll down to the bottom of the page, click on the Debug link, and then click on “Reindex” at the bottom of the page that appears. This should remove the encoded characters from the posts indexed on WordPress.com, and thus fix the problem.
Let me know how it goes.
Morning Jeremy,
After doing what you recommended, I’m still seeing the problem.
I removed your/my prior code edit so that you could see the behavior first-hand. I won’t make any changes until I hear back from you at your convenience.
Note: I meant to say that Ampersands display as &
HERE’S WHAT I DID:
Used this post for reference: http://lakepath.com/lake-michigan-never-fails/
1) with your/my prior code edit still in place: Upon mouse/hover, the middle excerpt/post “Lake Effect Snow in Southwest Michigan” shows “…between South Haven Michigan & St. Joseph Michigan…”
http://lakepath.com/lake-effect-snow-southwest-michigan/2) I then removed your/my code edit from jetpack-related-posts.php.
Checked same posts/excerpts above and it shows “…between South Haven Michigan & St. Joseph Michigan…”3) I then re-indexed the posts as you outlined in JetPack/Debug/ReindexPosts (waited/refreshed until “posts indexed” was displayed): still seeing the issue
4) I then cleared my WordFence and Browser Caches and re-indexed the posts again: still seeing the issue
grrr… wish I could edit my posts 🙂
In a couple of places in my last post, I had typed in & a m p s ; without spaces and of course it translated it into a single Ampersand…
So couple edits to my last post:
Note: I meant to say that Ampersands display as: & a m p s ;
Bullet #2: it shows “… between South Haven Michigan & a m p s ; St. Joseph Michigan…”
Test: would backticks prevent translation… ‘&s;’
I see it now, thanks!
http://i.wpne.ws/ZHIJThe code my colleague used to fix the problem only solves the issue for the ellipsis at the end of the excerpt, but not the other characters in the excerpt. I let him know about it, and we’ll think of a way to fix that problem as well.
I’ll let you know how it goes.
The topic ‘Related Posts &Hellip Typo on Hover’ is closed to new replies.