I get the following error at the top of my site when trying to use this plugin:
A PHP Error was encountered
Severity: Notice
Message: Undefined index: results
Filename: shortn_tweet/pi.shortn_tweet.php
Line Number: 207
Any idea why?
Here’s the code used:
{exp:shortn_tweet title="{title}" url="{url_title_path=weblog/item}" short_url="bit.ly"}
<li><a href="{twt:twitter_url}{twt:title} {twt:title_url} (via @masuga)">Tweet this thang</a></li>
{/exp:shortn_tweet}
I was using bitly in my pages, but found that I was getting dozens of links created for each entry. People were not making these as they all have 0 clicks. It looks like each page load creates a new link in my bit.ly account. The code I was using is:
{exp:weblog:entries weblog="daily" disable="members|trackbacks" limit="1" dynamic="on"}
<div id="issue_number" class="grid_19 prefix_5 alpha">
Daily Topic for {entry_date format="%F %d, %Y"}
</div>
<div class="grid_4 suffix_1 alpha">
<h5>{gpd_daily_dev_reference}</h5>
<span class="scripture">{gpd_daily_dev_verse}</span>
<hr>
{gpd_daily_dev_text}
<hr>
<div class="pray">{gpd_daily_dev_prayer}</div>
</div>
<div class="grid_12 detail_text">
<div class="grid_12 social_share">
<div class="grid_2 prefix_5 alpha facebook_sharer"
<a href="http://www.facebook.com/sharer.php%22name=%22fb_share">Share</a>[removed][removed]
</div>
<div class="grid_2">
{exp:shortn_tweet title="{title}" url="{url_title_path=issue/day}" short_url="bit.ly"}
<a href="http://{twt:twitter_url}{twt:title}">{site_url}/graphics/ui/tweet-this.png</a>
{/exp:shortn_tweet}
</div>
<div class="grid_3 omega">
<a href="http://{permalink=contact/tell-a-friend}" title="Tell A Friend">{site_url}/graphics/ui/email-share-icon.png</a>
</div>
</div>
<h3>{title}</h3>
{if gpd_daily_author !=""}
<div class="article_credit">by {gpd_daily_author}</div>
{/if}
{gpd_daily_text}
<span><a href="http://{gpd_daily_joshua_project}">Learn more at joshuaproject.net</a></span>
<hr>
<div class="pray">
{gpd_daily_topic_prayer}
<hr>
</div>
{/exp:weblog:entries}
I get the following error at the top of my site when trying to use this plugin: A PHP Error was encountered Severity: Notice Message: Undefined index: results Filename: shortn_tweet/pi.shortn_tweet.php Line Number: 207 Any idea why? Here’s the code used:{exp:shortn_tweet title="{title}" url="{url_title_path=weblog/item}" short_url="bit.ly"} <li><a href="{twt:twitter_url}{twt:title} {twt:title_url} (via @masuga)">Tweet this thang</a></li> {/exp:shortn_tweet}
Not sure if this plugin is still in active development since the thread isn’t active anymore. I am experiencing the same issue described above. The plugin works fine - however, it throws up a log of errors at top of my page when i go to the site - happens about 90% of the time.
Also, i have been trying to add something like “#topic” to the output to make sure the tweet is seen when searching by that topic name. i have tried so many variations of it and nothing works.
I was unsubscribed from this thread.
@vacquah: You’re saying you can’t add a hashatag at all? And you’re getting all these Notice errors? Can you share any more code from your page, outside of just the exp:shortn_tweet tags? Are you using the EE1 or EE2 version? Are you positive you have a bit.ly account, and that you entered your info into the plugin settings? Any other info you can share would make this easier.
I was unsubscribed from this thread. @vacquah: You’re saying you can’t add a hashatag at all? And you’re getting all these Notice errors? Can you share any more code from your page, outside of just the exp:shortn_tweet tags? Are you using the EE1 or EE2 version? Are you positive you have a bit.ly account, and that you entered your info into the plugin settings? Any other info you can share would make this easier.
Hi! Great to hear from you. a few details:
the plugin works fine - i have a bit.ly pro account and have successfully inserted the api key and account name in the relevant line items. clicking on the “tweet this” buttom successfully takes me to twitter and the link shortens as advertised. however,
i cant add a hastag to the code. for example, doing something like this does not work ( hastag part does not appear )
{exp:shortn_tweet title="{title}" url="{title_permalink=blog/article}" short_url="bit.ly"}
<a href="http://{twt:twitter_url}Reading:">Tweet This</a>
{/exp:shortn_tweet}
my php error messages are exactly like in the post I linked to. it used to happen very infrequently , but now, it happens on almost every other page load.
I am on EE 1.6.8 the latest version ( 2010021). I have MSM and a bunch of other third party modules installed.
i will be more than happy to give you access to the server to poke around.
here is my code: cleaned up a bit.
{assign_variable:my_weblog="blog"}
{assign_variable:my_template_group="blog"}
{embed="includes/html_header" url_title="{segment_3}"}
<body>
<div id="wrap">
<div class="topline"></div>
{embed="includes/globalheader" loc="blog"}
<div id="main" class="clearfix">
{exp:weblog:entries weblog="{my_weblog}" orderby="date" sort="desc" limit="1" track_views="one" require_entry="yes" disable="member_data|trackbacks|pagination"}
<div id="intro">
{entry_date format=' %l, %F %d, %Y '}<br>
<div id="articleposttitle"><a href="http://{title_permalink=blog/article}">{title}</a></div>
{desc}
</div> <!-- end intro -->
<div id="article">
<div class="summary">{summary}</div>
{if body != ""}<div class="body">{body}</div>{/if}
{if extended != ""}<div class="extended">{extended}</div>{/if}
{if no_results}{redirect="404"}{/if}
{if both_related_entries != ""}
<h3>Related Entries</h3>
<ul class="related">
{both_related_entries}
<li><a href="http://{path=blog/article}{both_related_entry_url_title}">{both_related_entry_title}</a></li>
{/both_related_entries}
</ul>
{/if}
</div> <!-- end article -->
<br>
<div id="articlenav">
{exp:weblog:prev_entry weblog="{my_weblog}"}
<span class="preventry"><a href="http://{path={my_template_group}/article}">{prev_entry->title}</a></span>
{/exp:weblog:prev_entry} |
{exp:weblog:next_entry weblog="{my_weblog}"}
<span class="nextentry"><a href="http://{path={my_template_group}/article}">{next_entry->title}</a></span>
{/exp:weblog:next_entry}
<a href="http://{path={my_template_group}/index}">Back To Main Blog Page</a>
</div> <!-- end articlenav -->
<div id="postmeta" class="clearfix">
<div class="postmetainner1">
<h5 class="postdetails">Post Details</h5>
<a href="http://{title_permalink={my_template_group}/article}">Permalink</a> /
<a href="#comment%22class=%22titlemeta" title="Comment" class="titlemeta"> {comment_total} Comments</a> /
Category:{categories}<a href="http://{path={my_template_group}/index}"> {category_name}</a> {/categories} /
Tags:
{exp:tag:tags entry_id="{entry_id}" type="weblog" backspace="2" orderby="clicks" sort="desc" limit="2"}
<a href="http://{path=%27blog/tagged_entries/tag%27}{websafe_tag}" title="{tag}">{tag}</a> {/exp:tag:tags} /
</div>
<div class="postmetainner">
<h5 class="share">Share</h5>
{exp:shortn_tweet title="{title}" url="{title_permalink=blog/article}" short_url="bit.ly"}
<a href="http://{twt:twitter_url}Reading:">Tweet This</a>
{/exp:shortn_tweet}
</div>
</div>
</div> <!-- end main -->
</div> <!-- end wrap -->
<div id="footer">{embed="includes/globalfooter"}</div>
</body>
</html>
Well, the simplest way to get the hashtags working is to urlencode the hash yourself:
<a href="http://{twt:twitter_url}Reading:">
_(remove the space from the % 23)__The other thing you could do is download the [url=http://github.com/mdesign/shortn-tweet.ee_addon]new 1.6.8 version (Sn’T 1.3) at Github where I added a “hashtags” parameter:
{exp:shortn_tweet title="{title}" url="{url_title_path=article/item}" short_url="is.gd" hashtags="#foo #bar"}
<a href="{twt:twitter_url} {twt:title} - {twt:title_url} {twt:hashtags} (via @masuga)">Tweet This[/url]
{/exp:shortn_tweet}
I also think I suppressed those error notices/undefined indexes when getting an error code back from bit.ly.
Well, the simplest way to get the hashtags working is to urlencode the hash yourself:_(remove the space from the % 23)__The other thing you could do is download the [url=http://github.com/mdesign/shortn-tweet.ee_addon]new 1.6.8 version (Sn’T 1.3) at Github where I added a “hashtags” parameter:<a href="http://{twt:twitter_url}Reading:">
I also think I suppressed those error notices/undefined indexes when getting an error code back from bit.ly.{exp:shortn_tweet title="{title}" url="{url_title_path=article/item}" short_url="is.gd" hashtags="#foo #bar"} <a href="{twt:twitter_url} {twt:title} - {twt:title_url} {twt:hashtags} (via @masuga)">Tweet This[/url] {/exp:shortn_tweet}
Thanks for this - downloading now. How exactly do I use the hashtag parameter - i.e where do i get to specify what the actual hashtag is?
Thanks for this - downloading now. How exactly do I use the hashtag parameter - i.e where do i get to specify what the actual hashtag is?See the second code example, above.hashtags="#foo #bar"
something wrong - after updating to the new plugin and making the changes to the code - my entire single entry page comes up blank.. I will PM you a link right now …
Worked for me in testing. I’ll help if I can.
O.K - So I added in the bit.ly parameters ( username and api key). My pages still came up blank. I then commented out the entire shortn_tweet code from my template - the page still came up blank. Then I completely uninstalled the plugin - page came up o.k!.
Then to test again, I reinstalled the plugin, updated the bitly parameters in the source code and put the code in my template - page came up blank again.
Worked for me in testing. I’ll help if I can.O.K - So I added in the bit.ly parameters ( username and api key). My pages still came up blank. I then commented out the entire shortn_tweet code from my template - the page still came up blank. Then I completely uninstalled the plugin - page came up o.k!. Then to test again, I reinstalled the plugin, updated the bitly parameters in the source code and put the code in my template - page came up blank again.
As you can imagine, this is hard for me to debug without seeing the code on the template or knowing what version of EE you’re using or your server setup, etc.
Have you tried flipping the short_url parameter to is.gd for testing? Does the blank page only show when you’re using bit.ly?
As you can imagine, this is hard for me to debug without seeing the code on the template or knowing what version of EE you’re using or your server setup, etc. Have you tried flipping the short_url parameter to is.gd for testing? Does the blank page only show when you’re using bit.ly?Worked for me in testing. I’ll help if I can.O.K - So I added in the bit.ly parameters ( username and api key). My pages still came up blank. I then commented out the entire shortn_tweet code from my template - the page still came up blank. Then I completely uninstalled the plugin - page came up o.k!. Then to test again, I reinstalled the plugin, updated the bitly parameters in the source code and put the code in my template - page came up blank again.
you hit the nail on the head - blank page only shows when i use bit.ly - when i flipped over to is.gd, works like a charm. Unfortunately, I am tied to using bit.ly , ( testing gout their new pro service). but note that bit.ly worked with the last version.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.