Tag Archives: refresh

How to test your ical calendar events feed

The amr-events plugin offers a ical feed for any wordpress archive that generates an rss feed. (Provided of course there are events created with that categeory, tag, author etc).  Simply add ?feed=ics at the end of the url.

Note the ics feed will list ALL events that meet the archive criteria. IE: it should return both

  • the standard posts that have event data AND
  • the custom post type events if you have both configured.

Subscribing or Importing or “Adding event to Google”

Import a calendar

Import a ics file means that one imports the events as they are defined in the calendar file.  There is no syncing or updates – ie you will NOT receive any updates made to the calendar or events.  One can import a set of events into an existing calendar.

Subscribe to a calendar

Subscribing means telling the calendar application the url of the calendar.  It will then fetch the calendar at regular intervals, checking for updates.  The calendar must be available publicly, and in Google’s case, there must be a robots.txt file that allows access for the google bot.  Usually this would appear as a separate calendar in one’s calendar application, allowing one to “click” the calendar off or on (very handy).  In google’s case there is often a delay in receiving updates (sometimes > 24hours).  Add your request for improvement by upvoting this feature request to at least allow manual refresh of google calendar .

Adding a event to Google

The amr-ical-events-list plugin provides the possibility of including a “add to google” link, which will pass the event details to google calendar (if the user is logged in) and create the event in the individuals calendar.

Problems subscribing to a the amr-events feed

  • I am aware of some problems directly subscribing from google calendar. It is either VERY SLOW (as in it may take awhile before the events appear), or reports a problem with robots.txt.  Doing some searches indicates that this is not an uncommon problem when interacting with google.   Saving the ics file and importing to the Google calendar does work however.  So i guess for ease of use the “add to google” button I have may have to stay.
  • Thunderbird seems to subscribe quite happily.
  • Windows Calendar (does anyone even use that ?) is also fine.

Getting Out of Memory Messages?

I need to look into this further, I had this problem as soon as I activated the permalinks and the rewrite rules (which may or may not have had anything to do with it), but in googling answers, did find that wordpress may be a hog on memory and partially this may be due to auto loading global options.
If you are able to up your memory, add this to your wp_config.php

define(‘WP_MEMORY_LIMIT’, ’64M’);

A temporary fix may be to go to your DB and delete all the transient options.  Cached versions of feeds etc which may be getting loaded into memory.

How to make the refresh icon or link show?

The refresh icon or link is an optional extra that external ics users may want.

Sample Calendar Properties configuration
Sample of displayed calendar properties

If you’d like to switch it on to show for your calendar,

  • Go to the plugin settings page
  • Click on the list type you want to configure
  • Click open the ‘calendar properties’ section
  • Find the ‘icalrefresh’ row
  • Enter a column number eg: 1. Note: 0 means no display
  • Save.
  • Go back to your display page. Redisplay it. Should see refresh icon at top.

Note: In any place where you can enter html you can configure your own refresh link – all you need is a ‘nocache’ query parameter at the end of the calendar page url.  Either &nocache or ?nocache depending on your permalinks.

To switch it on in the widget list type, enter a column number other than 1 against the ‘icalrefresh’ row:

Calendar Properties are switched OFF for the sample widget list type

If you do not like the refresh icon supplied, you can either:

General Options
  1. switch supplied images off and just have text links ala Google – tick ‘no images’ in the general settings
  2. possibly use css image replacement techniques and your own css to add your own images
  3. Do your own html link.

Refresh calendar if new dates not showing

“I’ve updated my ical and it’s not showing in the ical events”

If you are using a remote ical file  you may NOT want your website fetching it every time someone browses to a page with the events.  Depending on the volume you could hit calendar limits by the provider of the ics url.  eg: https://developers.google.com/calendar/pricing.

Also at times, the ics url may time out and the fetch of the ics file may fail.  Timeouts could happen because of your server or their server.

Therefore the amr ical events plugin caches the ical file and allows you to specify how frequently to update the cache.  If you update events once a week, then 24 hours may be adequate.   Of course you can also make a manual refresh happen any time.

How often is the calendar checked for new events?

A default refresh period or cache value in hours is specified in the admin menu configuration.   Consider your update frequency when setting this value.     If cached file is older than the cache value on the next request, the file will be refetched.

The ical events cache setting in hours
The ical events cache setting in hours

Manual forced refresh

Refresh icon

If you have the refresh icon displayed on your calendar page, or widget, click it – it will force the ical file to be fetched again.

Hover over the refresh icon to see the last date and time that the cache was refreshed.

Time of last refresh
Time of last refresh

NOTE: there have been times when the file re-fetched has not yet been updated by the ical generator – this is NOT the plugin’s fault.  To check whether that is what is happening, save the ic file to  your pc and edit with note pad – see if your update is inside.

Look inside the ics file
Look inside the ics file

Refresh query parameters

If you do not have the refresh icon displayed, then add a “?nocache” or “&nocache” to your url depending on your wordpress url permalink structure and refresh the page.  In most cases this should cause the plugin to refresh.

Add nocache to url line if no refresh icon

Via the backdoor

Delete the cache file itself – in your uploads directory, look for amr-ical-events folder and delete the contents – that will cause a refresh as though it were the first time.

cache folder
Delete the cache files

Of course by the time you have read all of this and etc, it may have refreshed anyway!