Support

Home Forums Event Espresso Premium iCal download button causing error

iCal download button causing error

Posted: May 3, 2018 at 4:01 pm

Viewing 1 reply thread


communityed

May 3, 2018 at 4:01 pm

I am receiving an error 405 error from the web server when I click to download the iCal file for an event at this url https://www.lamission.edu/communityedwp/index.php/events/

I looked at the source I found the following form tag:

<form id="download-iCal-frm-3" class="download-iCal-frm" action="https://www.lamission.edu/communityedwp?ee=download_ics_file&ics_id=3" method="post">

It appears that the format of the URL communityedwp?… is what is causing the issue. If I edit the DOM using Chrome’s dev tools by adding a / in front of the ? to look like communityed/?… then it works. I know EE is not supported on IIS but everything else appears to be working as expected. I suspect this has to do with the URL rewrite module in IIS which I can’t disable due to it being required for another system. Is it possible to change how the URL is derived in the php?


Tony

  • Support Staff

May 4, 2018 at 4:25 am

Hi there,

I’m not a server admin by any means (especially not windows servers) but it sounds like the same problem posted here:

https://stackoverflow.com/questions/19324407/how-can-i-post-form-data-to-a-url-without-a-trailing-slash-iis6-asp-classic-or

You can change this within EE but there’s no filter to do so so it would require a core file edit (which we don’t recommend) and will be lost each time EE updates. Although as mentioned we don’t recommend changing core I can give you the location so you can at least get something working right now:

\event-espresso-core-reg\modules\ical\EED_Ical.module.php

Line 84 will have:

$URL = add_query_arg( array( 'ee' => 'download_ics_file', 'ics_id' => $datetime->ID() ), site_url() );

Change that to:

$URL = add_query_arg( array( 'ee' => 'download_ics_file', 'ics_id' => $datetime->ID() ), trailingslashit(site_url()) );

I’m not sure if we’ll add a filter for this as it should be handled by the web server already, I’ll create a ticket for our developer to discuss it.

Viewing 1 reply thread

The support post ‘iCal download button causing error’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso