Support » Plugin: All-in-One Event Calendar » [Plugin: All-in-One Event Calendar] [Fixed] Subscribe Links not Working

  • Resolved Sean Donovan


    (I am just documenting the problem here to help others avoid it and that I was using the “Roots Theme” was incidental to the problem)

    Here’s the problem – the “Subscribe” to calendar link generated by the All-in-one Calendar plugin does not work on an iPhone. Nor does the “Subscribe in Google Calendar” which I suspect is related.

    Having spent the afternoon debugging the problem, here is what I have come up with:

    • The “Subcribe” link is a “webcal” URL and if you replace “webcal” with “http”, you can download the ICS file generated and you will get a ICS file that starts with:

      (Note the extra lines at the start) (fixed – see below)

    • As far as I can tell, the extra lines at the start are the problem and it is related to the Roots Theme, which I know because:
    • When I use the default Twenty-Eleven theme, the “Subscribe” link works and it generates an ICS page without the extra lines at the top, like this:
    • I have disabled all the plugins and disabled the HTML5 boilerplate htaccess to no avail. Something in the Roots theme is generating blank lines, likely a filter somewhere.
    • I tried disabling all the filters at once in config.php where most of them reside, with no success.

    [Fixed] Turns out it had nothing to do with the Roots theme, because I tested all the same plugins with the blank Roots Theme and to my chagrin, the subscribe link worked fine. I am documenting the solution here in case someone else runs into this problem:

    I had added a closing PHP “?>” to the end of functions.php and it had three blank lines after it. Those blank lines were appearing at the top of the webcal ICS text files which is why the Subscribe link in the Timely All-in-one calendar did not work. Removing the “?>” and more importantly, the blank lines after it, fixed the problem.

    Now if I could just jump in a time machine and tell myself what the problem was at noon today, I could have my afternoon back!

    If you don’t have spaces in you ICs output, then you might need to have a proper mime type set in htaccess, talked about here.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: All-in-One Event Calendar] [Fixed] Subscribe Links not Working’ is closed to new replies.