Answers.Body: <p>The issue was that the custom short name I was using (in this case the development domain) was not associated with the bitly account.  Total oversight! I've removed that and it works perfectly.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-22T22:18:33.973Z
Answers.Text: Glad you got it sorted out!
Answers.UserDisplayName: Aaron Berkowitz
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-22T18:25:49.390Z
Answers.LastActivityDate: 2016-09-22T18:25:49.390Z
Answers.UserDisplayName: ByteMyPixel
Body: <p>How can I use the shortener plugin to get and shorten the current URL?</p>
  
  <p>I've tried both twig and plugin methods shown in the docs, but the twig method outputs the FULL url, and the plugin method doesn't work at all (no output).</p>
  
  <p>Here is what I have in my template:</p>
  
  <pre><code> {% set longUrl = craft.request.getUrl() %}
   &lt;p&gt;share link: &lt;a href="{{ longUrl|shorten }}"&gt;{{ longUrl|shorten }}&lt;/a&gt;&lt;/p&gt;
  </code></pre>
  
  <p>The result with this is the full URL.</p>
  
  <p>My configs in the plugin settings:</p>
  
  <p><a href="https://i.sstatic.net/NJ36L.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NJ36L.png" alt="enter image description here"></a></p>
  
  <p>I cleared my system cache after I updated the settings as well.</p>
  
  <p>Any ideas what I'm missing here?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-22T00:16:08.597Z
Comments.Text: Never used the plugin, but it looks like they do some caching in https://github.com/aberkie/craft-shortener/blob/master/shortener/services/ShortenerService.php. Maybe you've got some cached bad results. Try clearing `craft/storage/runtime/cache`?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-22T15:34:46.963Z
Comments.Text: Are you getting any errors in devMode when you load the page that calls shortener?
Comments.UserDisplayName: Aaron Berkowitz
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-22T15:56:53.500Z
Comments.Text: Just tested it, no errors at all.
Comments.UserDisplayName: ByteMyPixel
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-22T15:59:19.963Z
Comments.Text: Oh!  It works when I clear the custom short domain :)
Comments.UserDisplayName: ByteMyPixel
Tags: <plugins><url><filter><variable>
Title: How to shorten 'craft.request.getUrl()' with the shortener plugin?
ThreadText: # How to shorten 'craft.request.getUrl()' with the shortener plugin?
  
  (Asked by: username_0 on 2016-09-21)
  
  How can I use the shortener plugin to get and shorten the current URL?
  
  I've tried both twig and plugin methods shown in the docs, but the twig method outputs the FULL url, and the plugin method doesn't work at all (no output).
  
  Here is what I have in my template:
  
  ```
   {% set longUrl = craft.request.getUrl() %}
   <p>share link: <a href="{{ longUrl|shorten }}">{{ longUrl|shorten }}</a></p>
  
  ```
  
  The result with this is the full URL.
  
  My configs in the plugin settings:
  
  [![enter image description here](https://i.sstatic.net/NJ36L.png)](https://i.sstatic.net/NJ36L.png)
  
  I cleared my system cache after I updated the settings as well.
  
  Any ideas what I'm missing here?
  
  **Tags:** plugins, url, filter, variable
  
  > **Comments:**
  > **username_1**: Never used the plugin, but it looks like they do some caching in https://github.com/aberkie/craft-shortener/blob/master/shortener/services/ShortenerService.php. Maybe you've got some cached bad results. Try clearing `craft/storage/runtime/cache`?  
  > **username_2**: Are you getting any errors in devMode when you load the page that calls shortener?  
  > **username_0**: Just tested it, no errors at all.  
  > **username_0**: Oh!  It works when I clear the custom short domain :)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-09-22. Score: 2 | Accepted answer
  
  The issue was that the custom short name I was using (in this case the development domain) was not associated with the bitly account. Total oversight! I've removed that and it works perfectly.
  
  > **Comments:**
  > **username_2**: Glad you got it sorted out!  
  
  ---
  
  