Support » Plugin: Google Calendar Widget » [Plugin: Google Calendar Widget] JavaScript error in Wiki.js apply()

  • Steve


    I’ve just installed Google Calendar Widget on my WordPress server ( It displayed the list of events ok, but when I clicked on an event to get the full details, nothing happened.

    Browser is Chrome 22.0.1229.79 m, although I also tried it with IE 8 and had the same problem.

    Digging down with the Chrome Developer tools, I discovered that a JavaScript exception was occurring in apply() in Wiki.js (line 191): undefined method ‘rex’.

    Digging further, it turned out that there was a problem with the loop “for (var i in rules)”: it worked ok if ‘rules’ had multiple elements, i went 0 1 2 3 etc; however if ‘rules’ had only one element, i was set to “toJSON” (rather than 0) which meant that rules[i] is undefined.

    This may be a bug in Chrome, I haven’t had time to debug on other browsers.

    I tried to reproduce the problem with the example calendars at, however these don’t have enough data (location, description) to trigger the problem – str is blank when apply() is called.

    I’ve found a simple fix which seems to get round the problem – change the for loop to:

    for (var i = 0; i < rules.length; i++) {

  • The topic ‘[Plugin: Google Calendar Widget] JavaScript error in Wiki.js apply()’ is closed to new replies.