Answers.Body: <p>First I'd confirm that the functionality works on another site. You can use a <a href="https://civicrm.org/demo" rel="nofollow noreferrer">demo site</a> for this, or you can check Google for <a href="https://www.google.com/search?q=inurl%3Acivicrm%2Fevent%2Fical" rel="nofollow noreferrer"><code>inurl:civicrm/event/ical</code></a></p>
  
  <p><a href="https://i.sstatic.net/OFSoW.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OFSoW.png" alt="search results for civicrm/event/ical"></a></p>
  
  <p>OK, so it works for some people! Next check might be to find out if the WordPress path works (<code>inurl:civicrm/?page=CiviCRM&amp;q=civicrm%2Fevent%2Fical</code> perhaps? IDK if Google / other search engines support checking for pages with specific query params though, as CiviCRM uses here.)</p>
  
  <p>The next place I'd look would be what generates the iCal feed. Is it coming from an extension or core CiviCRM? Your question didn't say this for sure, so a search for "civicrm/event/ical" on the Git repo will reveal a menu XML entry if it's a core thing. (If not we'd go looking for the relevant extension.)</p>
  
  <p>By searching the <a href="https://github.com/civicrm/civicrm-core" rel="nofollow noreferrer">civicrm/civicrm-core</a> repo I found that this is core functionality, because the path you're trying to understand has a menu.xml entry which shows up in the results.</p>
  
  <ul>
  <li><a href="https://github.com/civicrm/civicrm-core/blob/f6a3ccdf71f0127ca41b55c124b29915a0827e59/CRM/Event/xml/Menu/Event.xml" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/f6a3ccdf71f0127ca41b55c124b29915a0827e59/CRM/Event/xml/Menu/Event.xml</a></li>
  </ul>
  
  <p>Looking at that we can see:</p>
  
  <ul>
  <li>the permission checked for will be "view event info"</li>
  <li>the page callback class is <code>CRM_Event_Page_ICalendar</code></li>
  </ul>
  
  <p>So you could perhaps add some debug code to that class (start at the <code>run()</code> method), and see if this method gets called when a visitor hits your iCal feed. </p>
  
  <ul>
  <li><a href="https://github.com/civicrm/civicrm-core/blob/8b9a8f4abb25cfa7a498eaaa3e459e4d313e350a/CRM/Event/Page/ICalendar.php" rel="nofollow noreferrer">https://github.com/civicrm/civicrm-core/blob/8b9a8f4abb25cfa7a498eaaa3e459e4d313e350a/CRM/Event/Page/ICalendar.php</a></li>
  </ul>
  
  <p>There's also an open issue on CiviCRM's Gitlab, <a href="https://lab.civicrm.org/dev/wordpress/issues/25" rel="nofollow noreferrer">dev/wordpress#25</a>. That's worth subscribing to, even though the description is different to yours ... the fact that both affected sites are WordPress may be significant.</p>
  
  <p>Where you'd go from there depends on what you find so far, but your question was "where do I look next", so here you go! Good luck :)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-09T00:18:26.510Z
Answers.Text: I'm not sure how this answer comports with the standard protocols of StackExchange, but the GitLab link above is where we isolated the problem -- namely a dysfunctional permissions check in [CRM/Event/BAO/Event.php](https://lab.civicrm.org/dev/core/blob/master/CRM/Event/BAO/Event.php#L862). Now to get that fixed so the permissions check does what it was intended. (Leaving that to the developers!)
Answers.UserDisplayName: Prónay
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-04T18:49:30.813Z
Answers.LastActivityDate: 2019-05-06T08:02:43.863Z
Answers.LastEditDate: 2019-05-06T08:02:43.863Z
Answers.UserDisplayName: Chris Burgess
Body: <p>As I write, <a href="https://www.applestreetmarket.coop/civicrm/?page=CiviCRM&amp;q=civicrm%2Fevent%2Fical&amp;reset=1&amp;list=1&amp;html=1" rel="nofollow noreferrer">our iCal feed page</a> loads "None found" instead of the numerous current and future public events that are in active status on our <strong>Civi 5.13 (WordPress 5.1.1, PHP 7.2.13)</strong> site.</p>
  
  <p>I don't see any WordPress Permissions settings that could hide our public events, especially not while I'm logged in as Admin.</p>
  
  <p>I've disabled all WP plugins (except CiviCRM) and there was no change.</p>
  
  <p>For what it may be worth, the Calendar (com.agiliway.civicalendar) extension works fine. But none of the feed buttons on the Events Dashboard deliver any current or future public events.</p>
  
  <p>Also (thanks Aidan!), <strong>these buttons probably never worked on our site.</strong> If you're curious, the history of (and reason for now ditching) the workaround is detailed below in the Comments.</p>
  
  <p>ALSO ... this from the Civi Log Viewer, and it coincides with loading the Events Dashboard in the Civi Admin. There are no log entries corresponding with loading the HTML listing of current and future public events.</p>
  
  <blockquote>
    <p>[warning] Deprecated function CRM_Event_BAO_Event::checkPermission,
    use CRM_Event_BAO_Event::getAllPermissions. Array (
        [civi.tag] => deprecated )</p>
  </blockquote>
  
  <p>Nothing from the WordPress PHP error log. Where should I look next?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-03T08:21:38.153Z
Comments.Text: Was this working previously on this site?
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-03T12:49:47.790Z
Comments.Text: No, several Civi iterations ago, I discovered it wasn't working. Initially, I worked around using the Event Organiser and CiviCRM Event Organiser plugins for WP. The latter recently stopped working though. And even when that plugin was working, our site admins found it too cumbersome with manually importing events from Civi to the front-facing EO calendar. We really need the Civi iCal feed to work so we can embed a Google calendar on the front end of our site and eliminate manual synchronizing.
Comments.UserDisplayName: Prónay
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-06T08:00:49.693Z
Comments.Text: See also https://civicrm.stackexchange.com/questions/29048/problem-with-the-ical-feed-of-the-calendar and https://lab.civicrm.org/dev/wordpress/issues/25 ?
Comments.UserDisplayName: Chris Burgess
Tags: <civievent><html><calendar>
Title: iCal feed doesn't work: lots of public events, but "None found"
ThreadText: # iCal feed doesn't work: lots of public events, but "None found"
  
  (Asked by: username_0 on 2019-05-02)
  
  As I write, [our iCal feed page](https://www.applestreetmarket.coop/civicrm/?page=CiviCRM&q=civicrm%2Fevent%2Fical&reset=1&list=1&html=1) loads "None found" instead of the numerous current and future public events that are in active status on our **Civi 5.13 (WordPress 5.1.1, PHP 7.2.13)** site.
  
  I don't see any WordPress Permissions settings that could hide our public events, especially not while I'm logged in as Admin.
  
  I've disabled all WP plugins (except CiviCRM) and there was no change.
  
  For what it may be worth, the Calendar (com.agiliway.civicalendar) extension works fine. But none of the feed buttons on the Events Dashboard deliver any current or future public events.
  
  Also (thanks username_1!), **these buttons probably never worked on our site.** If you're curious, the history of (and reason for now ditching) the workaround is detailed below in the Comments.
  
  ALSO ... this from the Civi Log Viewer, and it coincides with loading the Events Dashboard in the Civi Admin. There are no log entries corresponding with loading the HTML listing of current and future public events.
  
  > [warning] Deprecated function CRM\_Event\_BAO\_Event::checkPermission,
  > use CRM\_Event\_BAO\_Event::getAllPermissions. Array (
  > [civi.tag] => deprecated )
  
  Nothing from the WordPress PHP error log. Where should I look next?
  
  **Tags:** civievent, html, calendar
  
  > **Comments:**
  > **username_1**: Was this working previously on this site?  
  > **username_0**: No, several Civi iterations ago, I discovered it wasn't working. Initially, I worked around using the Event Organiser and CiviCRM Event Organiser plugins for WP. The latter recently stopped working though. And even when that plugin was working, our site admins found it too cumbersome with manually importing events from Civi to the front-facing EO calendar. We really need the Civi iCal feed to work so we can embed a Google calendar on the front end of our site and eliminate manual synchronizing.  
  > **username_2**: See also https://civicrm.stackexchange.com/questions/29048/problem-with-the-ical-feed-of-the-calendar and https://lab.civicrm.org/dev/wordpress/issues/25 ?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-05-04. Score: 3 | Accepted answer
  
  First I'd confirm that the functionality works on another site. You can use a [demo site](https://civicrm.org/demo) for this, or you can check Google for [`inurl:civicrm/event/ical`](https://www.google.com/search?q=inurl%3Acivicrm%2Fevent%2Fical)
  
  [![search results for civicrm/event/ical](https://i.sstatic.net/OFSoW.png)](https://i.sstatic.net/OFSoW.png)
  
  OK, so it works for some people! Next check might be to find out if the WordPress path works (`inurl:civicrm/?page=CiviCRM&q=civicrm%2Fevent%2Fical` perhaps? IDK if Google / other search engines support checking for pages with specific query params though, as CiviCRM uses here.)
  
  The next place I'd look would be what generates the iCal feed. Is it coming from an extension or core CiviCRM? Your question didn't say this for sure, so a search for "civicrm/event/ical" on the Git repo will reveal a menu XML entry if it's a core thing. (If not we'd go looking for the relevant extension.)
  
  By searching the [civicrm/civicrm-core](https://github.com/civicrm/civicrm-core) repo I found that this is core functionality, because the path you're trying to understand has a menu.xml entry which shows up in the results.
  
  * <https://github.com/civicrm/civicrm-core/blob/f6a3ccdf71f0127ca41b55c124b29915a0827e59/CRM/Event/xml/Menu/Event.xml>
  
  Looking at that we can see:
  
  * the permission checked for will be "view event info"
  * the page callback class is `CRM_Event_Page_ICalendar`
  
  So you could perhaps add some debug code to that class (start at the `run()` method), and see if this method gets called when a visitor hits your iCal feed.
  
  * <https://github.com/civicrm/civicrm-core/blob/8b9a8f4abb25cfa7a498eaaa3e459e4d313e350a/CRM/Event/Page/ICalendar.php>
  
  There's also an open issue on CiviCRM's Gitlab, [dev/wordpress#25](https://lab.civicrm.org/dev/wordpress/issues/25). That's worth subscribing to, even though the description is different to yours ... the fact that both affected sites are WordPress may be significant.
  
  Where you'd go from there depends on what you find so far, but your question was "where do I look next", so here you go! Good luck :)
  
  > **Comments:**
  > **username_0**: I'm not sure how this answer comports with the standard protocols of StackExchange, but the GitLab link above is where we isolated the problem -- namely a dysfunctional permissions check in [CRM/Event/BAO/Event.php](https://lab.civicrm.org/dev/core/blob/master/CRM/Event/BAO/Event.php#L862). Now to get that fixed so the permissions check does what it was intended. (Leaving that to the developers!)  
  
  ---
  
  