Closed jrthib closed 10 years ago
Hi, thanks for your contribution but the regexp already removes any shortcode from desc.
See if you can replicate my issue then. We were having an issue where we had a [caption][/caption] shortcode as the first line of content in post_content. The regexp would strip the code, then the excerpt would be a blank string in the twitter:description meta tag which would cause our post to not validate. I changed the file locally on our site to reflect the changes in my pull request and it fixed the issue.
Thanks for the response by the way :+1:
Oki doki thanks.
Also, if it helps, the shortcode we were using along with its attributes ended up being longer than 200 characters.
But if you have only a shortcode that is normal it's blank. Can't replicate what you're saying
The page we saw the issue on had a lot of text content in addition to the short code. I'll replicate our environment to see if it happens there, if it does, I'll send over a URL for you to check it out as well.
On May 12, 2014, at 10:02 AM, Julien Maury notifications@github.com wrote:
But if you have only a shortcode that is normal it's blank. Can't replicate what you're saying
— Reply to this email directly or view it on GitHub.
You can use ifferent way to solve blank desc issue e.g custom fields or SEO plugins desc with WP SEO or All in One SEO.
I think fixing the problem by installing another plugin is not ideal.
Hope for the best. I can only fix what regards the plugin not other stuffs that might be related to its use or other plugins. The point is my plugin is a good additional feature for thoses very popular SEO plugins.
If you want to publish pages with only shortcodes and no content I do not see how to help you. There is a snippet with excerpt field if your theme is using it : https://wordpress.org/plugins/jm-twitter-cards/other_notes/
Please view the source on this page. This is a clean Wordpress installation with JM Twitter Cards installed. You can see that the description field is blank. This causes twitter to ignore the Twitter card when posting a link to the page.
<!-- JM Twitter Cards by Julien Maury 5.2.2 -->
<meta name="twitter:card" content="summary">
<meta name="twitter:creator" content="@TweetPressFr">
<meta name="twitter:site" content="@TweetPressFr">
<meta name="twitter:title" content="Addiction Researcher to Receive Faculty Recognition Award">
<meta name="twitter:description" content="">
<meta name="twitter:image:src" content="https://g.twimg.com/Twitter_logo_blue.png">
<!-- /JM Twitter Cards -->
This meta block fails Twitter card validation, if you run the URL here: https://dev.twitter.com/docs/cards/validation/validator
While I can see it I need to know what is precisely set for this particular post. Do you mind making a screenshot ?
Feel free to log in: http://twittercards.ironhorsewebsolutions.com/wp-admin
This forum is public please for your safety do not give credentials.
I recommand you to remove this access since it has been publically given. I'll see what I can do to fix this.
Thanks for checking. The fix that worked for me was to add strip_shortcodes()
back into the code as I showed in my pull request from earlier.
This can be seen on line 66 of utilities.php