Is it possible to share the url, or you could mail us(support at wpdeveloper.net) or use support form in our main site. We will look into it.
Thread Starter
cu4fun
(@cu4fun)
Ok I activate it again here and here
Version of Plugin is 2.4.1
Thanks
Do you have separate excerpt for each post? Or its generating automatically.
Thread Starter
cu4fun
(@cu4fun)
No separate excerpts, only post text.
Check the update released, it should solve description issue.
Thread Starter
cu4fun
(@cu4fun)
Update to v 2.4.2 but it is still the same – wrong things in “content”-tag, sorry. (No cache plugin installed and browser also refreshed)
Sad! This seems like a site specific error. If you are willing to share access to you site with our developer, then we could take a close look, and could try to solve your specific problem. You could email us at info at wpdeveloper.net
What does resolved mean here? Did you find a solution to the problem when you had access to cu4fun’s site? I have the very same problem with Contextual Related Posts (which developer asked me to ask you: https://wordpress.org/support/topic/twitter-cards-10?replies=2) and haven’t found a solution yet.
Thank you! Best,
Arno
@arnoanou, no, we did not got access for cu4fun’s site. When we released 2.4.2 in our test it solves the description issue in our known scenario. Thats why marked as resolved. If you have exact same issue, could you please let us debug and fine tune the error? You could email us at info at wpdeveloper.net
Thread Starter
cu4fun
(@cu4fun)
There was no solution, so I don’t use it any more. I’m not giving a foreign person access to my site.
Well, thanks for this information. I’m pretty sure the developers would have tackled this issue if they’d known it still exists.
I don’t like this granting access thing, too, that’s why I still hope we can solve this without, but it seems to be a pretty usual method among WordPress support forums.
Thread Starter
cu4fun
(@cu4fun)
The Yoast-SEO Plugin also generates Twitter-Cards. That is my solution. Maybe, it’s one for you.
Actually we originally had two processes to generate description, 1) From Excerpt; if that fails then 2) from first para, by using default function.
Lots of people don’t put Excerpt manually. So we needed to auto generate from the first para. When we found the issue via user report, we added a backfill on existing process. If the both of our processes fail, I added a WP Function to strip text from post content.
You could look at the code block here.
This should work on 100% scenario. Issue arise when some other plugin modifies the content inside the post loop. Only way to solve this is to recreate and do some debug to see how we could create some additional algorithm to generate a better description.
Sorry, I can’t read .php, I’m no coder. Is there a way for you to recreate and probably debug this issue? I’m pretty sure Contextual Related Post isn’t the only plugin out there modifying the content inside the post.
Thank you!
The problem is indeed caused by the plugin “Contextual Related Post”. In your function twcm_get_description() the used function get_the_excerpt() (line 134) returns the content of the box with related posts.
To avoid this, I changed the source of twitter-cards-meta/twitter-cards-meta.php as follows (line 134 and 135):
if($desc=="")
{
$desc=trim(get_the_excerpt());
}
to
if($desc=="")
{
//$desc=trim(get_the_excerpt());
$desc = trim($post->post_content);
}
It is a quick workaround and I’m not shure, if it is the best idea, but it works for now.