Answers.Body: <p>From your screenshot, I was able to test this same functionality on two test sites (a good general troubleshooting tactic!).  The problem does NOT replicate itself there.  The issue is specific to your site, or (less likely) reflects a bug in an older version of CiviCRM than the ones I'm testing.</p>
  
  <p>I was able to use your link to see the exact error - and you're correct, the issue is a blank line.</p>
  
  <p>Since you're using Drupal, I would look for a blank line at the end of <code>settings.php</code> and <code>template.php</code>.  I would also try testing whether the problem disappears if you change themes (preferably on a test copy of your site).  That will help you isolate whether the problem is in your theme.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-08T12:53:42.110Z
Answers.Text: Thanks Jon G! That did it.  There was actually a space at the start of the settings.php and 2 at the end of the template.php.
Answers.UserDisplayName: jansmath3
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-08T12:57:10.097Z
Answers.Text: Great!  I'll add a comment for others that looking at the beginning is actually more helpful, since lines at the end of a file are in many cases ignored.
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-07T05:50:31.570Z
Answers.LastActivityDate: 2017-09-07T05:50:31.570Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>When I click on the RSS icon for my events in Civi, I get the following error.</p>
  
  <pre><code>error on line 2 at column 6: XML declaration allowed only at the start of the document
  </code></pre>
  
  <p>From searching, it appears that this happens most commonly when there's added white space in a file.</p>
  
  <p>I've tried editing ./civicrm/templates/CRM/COre/Calendar/Rss.tpl to no avail.  </p>
  
  <p>Where else can I look to see if there's added white space?  Any other ideas?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Edit:</p>
  
  <p><a href="https://i.sstatic.net/USm2X.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/USm2X.jpg" alt="enter image description here"></a></p>
  
  <p>The RSS links to <a href="https://focusdc.org/civicrm/event/ical?reset=1&amp;list=1&amp;rss=1" rel="nofollow noreferrer">https://focusdc.org/civicrm/event/ical?reset=1&amp;list=1&amp;rss=1</a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-06T16:46:27.740Z
Comments.Text: Can you please include a screenshot that indicates which RSS icon you're clicking?  I see iCal icons for events but not RSS.  Thanks!
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-06T18:54:05.170Z
Comments.Text: Hi Jon G.  I edited the post above to include a screenshot.
Comments.UserDisplayName: jansmath3
Tags: <civievent>
Title: Event RSS Error Code
ThreadText: # Event RSS Error Code
  
  (Asked by: username_0 on 2017-09-06)
  
  When I click on the RSS icon for my events in Civi, I get the following error.
  
  ```
  error on line 2 at column 6: XML declaration allowed only at the start of the document
  
  ```
  
  From searching, it appears that this happens most commonly when there's added white space in a file.
  
  I've tried editing ./civicrm/templates/CRM/COre/Calendar/Rss.tpl to no avail.
  
  Where else can I look to see if there's added white space? Any other ideas?
  
  Thanks in advance.
  
  Edit:
  
  [![enter image description here](https://i.sstatic.net/USm2X.jpg)](https://i.sstatic.net/USm2X.jpg)
  
  The RSS links to <https://focusdc.org/civicrm/event/ical?reset=1&list=1&rss=1>
  
  **Tags:** civievent
  
  > **Comments:**
  > **username_1**: Can you please include a screenshot that indicates which RSS icon you're clicking?  I see iCal icons for events but not RSS.  Thanks!  
  > **username_0**: Hi Jon G.  I edited the post above to include a screenshot.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-09-07. Score: 0 | Accepted answer
  
  From your screenshot, I was able to test this same functionality on two test sites (a good general troubleshooting tactic!). The problem does NOT replicate itself there. The issue is specific to your site, or (less likely) reflects a bug in an older version of CiviCRM than the ones I'm testing.
  
  I was able to use your link to see the exact error - and you're correct, the issue is a blank line.
  
  Since you're using Drupal, I would look for a blank line at the end of `settings.php` and `template.php`. I would also try testing whether the problem disappears if you change themes (preferably on a test copy of your site). That will help you isolate whether the problem is in your theme.
  
  > **Comments:**
  > **username_0**: Thanks Jon G! That did it.  There was actually a space at the start of the settings.php and 2 at the end of the template.php.  
  > **username_1**: Great!  I'll add a comment for others that looking at the beginning is actually more helpful, since lines at the end of a file are in many cases ignored.  
  
  ---
  
  